PERMANENT EXISTENCE OF LANGUAGE CLASS

Mar 22, 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;

Share via

Filed in:

Tips CKEditor
Mahmoud Ramadan

Mahmoud Ramadan

Mahmoud is the creator of Digging Code and a contributor to Laravel since 2020.

Most recent

  • Get your environment ready to welcome Laravel v12

    Get your environment ready to we...

    FREE

  • How to generate Arabic PDF using TCPDF

    How to generate Arabic PDF using...

    FREE

  • What is SQL Injection

    What is SQL Injection

    FREE