Generally blogs does not provide the settings to insert code blocks in blogs. Below are the some useful solutions those can be uses for the code block purpose.
1. hilite.me
1. Visit hilite.me and Paste your code in source code window. 2. Select the language. 3. Select if you need to add line numbers to code view. 4. Click on Highlight button 5. Validate the format in preview window.
6. Go to your blog, Convert your blog view to HTML view. 7. Paste the HTML code generated by hilite. 8. Switch back to Compose view to check the result.
1. Visit https://pinetools.com/syntax-highlighter and Paste your code in Highlighted window. 2. Choose "Select the language" or "Auto Detect" option. 3. Select the language if you choose option "Select the language" in step 3. 4. Select the style from drop down. 5. Click on "Highlight!" button.
6. In Highlighted window, code is shown after applying styles.
7. In Highlighted code window, html code is shown that can be used in blog.



No comments:
Post a Comment