Highlighting Code in a Blog Post
May 27 |
Galaxie Blog uses a customized version of Prism.js to allow blog authors to share and highlight code.
Prism is a free, open-source library for highlighting code. This customized version of Prism is integrated with the Galaxie Blog Tiny Post Editor and supports scores of programming languages. It is also integrated with the Galaxie Blog themes and tailored to present code perfectly across all devices.
To embed code in the Post Editor, click on Insert - Code Sample. A new Insert/Edit Code editor will open.
At the top of this editor is a supported language dropdown highlighting a particular language. This dropdown supports all popular (and sometimes not so popular) web-oriented languages.
The languages supported in Galaxie Blog include:
- HTML/XML
- CSS
- Javascript
- C#
- Cfscript
- Java
- JSON
- JSONP
- PHP
- Python
- Ruby
- SQL
After selecting the language option, you want to share, copy, and paste your code. Click the Save button at the bottom of the editor.
You will see a preview of how the code is highlighted in the Tiny Post Editor. Once you submit your post, your code syntax will be highlighted on the blog page.
Related Entries
Tags
prism.jsThis entry was posted on May 27, 2022 at 7:26 PM and has received 950 views.