PERMANENT EXISTENCE OF LANGUAGE CLASS
Mar 21, 2024 Copy Link
I encountered trouble when I needed to highlight a code within an Article using PrismJS, especially in the process of updating because once the article is published, the language class is automatically removed, to overcome this problem you might re-write the language class again and again but, it's not a practical solution because you may forget to do so. Therefore, you can change the editor configuration to always remember the language class: 💆♂️
let editor = CKEDITOR.replace('your-textarea-id');
editor.config.allowedContent = true;