PrismJS / prism

Lightweight, robust, elegant syntax highlighting.
https://prismjs.com
MIT License
12.34k stars 1.29k forks source link

Highlighting working in TinyMCE, but not website #3792

Open Banana828 opened 7 months ago

Banana828 commented 7 months ago

Information:

I am using two systems: One is a manager that creates texts for the other system. The manager is built with Angular (TypeScript) and I managed to get Prism working in TinyMCE. I downloaded the JS and CSS (for the language C#) from the website and referenced them in my Angular application. The rest is pretty simple. When I use the code plugin I see I can select C# and it's highlighted nicely in my TinyMCE. I submit the text with the C# code.

I go to the other website, the one for customers. This is a WordPress website and I made a custom plugin to retrieve and show the texts from the manager. I referenced the JS and HTML for prism again. Then I try to view the text with the code highlighting... Nothing.

image

I can see the class language-csharp in the pre element, followed by a code HTML element.

Am I missing something?