Friday, August 21, 2020

How to Install Lightweight Prism Syntax Highlighter in Blog

How to ; var _ = self.Pr.test(parent.nodeName)) { parent.className = parent.className.replace(lang, '').replace(/s+/g, ' ') + ' language-' + language; } var code = element.textContent.tr, 'tag': { pattern: /lt;/?[w:-]+s*[wW]*?gt;/g, g, 'strg, g, g, g, .test(t.nodeName)||t.className. Now th Now your script is ready to use in Blogger template. And I will show you how to use this in Blogger template. How to Display Prism syntax highlighting script in Blog Post? This is very simple. Because we know to display any HTML script we have to switch to HTML view from Compose view in Blog Post. So while you create a new post then from Post Editor Select HTML view from Compose view. Now add the parsed script and switch to Compose view for publishing the content. Thats it. Now check your recently published content and see code snippets are displaying with Prism syntax highlighting style. For any further help feel free to leave a comment below. Thank you. Happy Blogging!!!

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.