Implementing highlighted code snippets while creating a post

Thank you for deciding to share your article with us. We know nothing good comes easy and that is why we have decided to assist you in writing very clean article filled with elegant code snippets.

This guide will put you through writing articles which includes code snippets in any language and format. To begin, you must have selected a type of article to write which is extensively described in this post.

To apply syntax highlighting, open the code view by clicking on the code logo which is shown in the image below

click on the logo to open the code view

When the code view is opened, the general syntax to get your code to be grabbed by our machine and highlight it is <pre data-enlighter-language="[language]">

The language inside the code is the type of code you’re writing. it can be any of the following [generic] [css] [html] [java] [js] [json] [md] [php] [python] [ruby] [msdos] [shell] [sql] [xml] [c] [cpp] [csharp] [rust] [lua] [matlab] [nsis] [diff] [vhdl] [avrasm] [asm] [kotlin] [squirrel] [ini] [raw] [no-highlight] without the braces [ ];

For example, you’re writing a javascript code, your code should be initialised like this <pre data-enlighter-language="js">

When you have initialised it in the code view, that’s all, when you click the code icon again to leave the code view, you should see a white background and any code written inside the white background would be highlighted.

While writing your code, the enter key should be entered by pressing shift+enter else, the line would break vigorously and exit the white background.

You can write as many lines of code as you can and when you’re done, you can use the enter key to escape the white background and continue on your article.

Your code should look like this when you’re done writing.

Choose A Format
Trivia quiz
Series of questions with right and wrong answers that intends to check knowledge
Voting to make decisions or determine opinions
Formatted Text with Embeds and Visuals
The Classic Internet Listicles
The Classic Internet Countdowns
Open List
Submit your own item and vote up for the best submission
Ranked List
Upvote or downvote to decide the best list item