MyBB Community Forums

Full Version: PrismJS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone,

I want to install PrismJS code highlighter, I'll use only C++ syntax highlighting, I installed CSS and uploaded the JS file into mybb/jscripts/prism.js

Now, as I am new to this, IDK what to do next, where should I add script and href the prism CSS if needed?
[Image: image.png]

EDIT: I tried this as replacement in MyCode, but it isn't working (at least in MyCode preview) Undecided
<pre><code class="language-cpp">$1</code></pre>

EDIT 2: Actually, it's working, sorry for opening this, I figured it out myself!
Hello, I manually installed prism.js and now I have a problem:
If code is using the tabbed indent, tabs just won't load into the editor. (everything is OK if I use spaces).

Now, I noticed that if I use the code button (default one), that tabs are being parsed too.

So, how can I clone the code button (or even better totally replace it with a new image and add the prism.js)?