We Do Tech, stuff.

Small business web and system solutions.

Free programs, software reviews, and tech, stuff.

Prism.JS Added For Syntax Highlighting

by: Dan Orlovsky
Posted On: 8/10/2017 1:11:15 PM

In this update we added Syntax Highlighting via PrismJS.


All blogs with code are going to be that much better!  PrismJS is a lightweight syntax highlighter, that really makes reading code samples easier.

So, an HTML code sample will now display as:

<html>
    <head>
        <title></title>
    </head>
    <body>
        <p>Here is some plain text!</p>
    </body>
</html>

A small issue I ran into was getting it to work with TinyMCE.  There's a codesample Plugin for TinyMCE, so in the editor, you can just click the {;} icon and add a code sample.  This was throwing Resource Not Found errors when TinyMCE would load up.  I tried to find the codesample plugin, but it seemed to be built-in, which it was. Well, the problem extended from me downloading the TinyMCE Community instead of the Development.  My reasoning was, at the time, I had no desire to work on TinyMCE.  I never thought things like plugins would be stripped from it as well.

As soon as I downloaded the full TinyMCE package and deployed everything to my server, it all works without a hitch!

One more note on using PrismJS - it is very important to include the script at the very bottom of the page, right before the closing body tag.

Less exciting portions of the most recent update includes fixing some sharing bugs on article pages, and fixing some bugs when it came to adding blogs. 


Dan Orlovsky

Self-taught full-stack developer and Visual Studio junkie specializing in C#, ASP.NET (WebForms and MVC), HTML5, and CSS3.  I design custom content management solutions for small-businesses looking to take control of their website.  Each project is built with the technical aptitude of the user in mind.

I am currently studying full-stack development from Node.JS using Express, React.Js, and MongoDb, so I can expand my offerings to the tech and business communities.

 


Comments

Ad Space