Answer the question
In order to leave comments, you need to log in
How to make a CKeditor plugin that renders a non-dynamic page containing dynamic. code (noscript mode)?
I've been struggling with this task for an hour. How to implement it in such a way that the dynamic code is rendered without dynamics by activating such a plugin, while not violating the integrity of the html document itself. I'm thinking of writing a parser that comments on tags like
Answer the question
In order to leave comments, you need to log in
// разрешить теги <style>
CKEDITOR.config.protectedSource.push(/<(style)[^>]*>.*<\/style>/ig);
// разрешить теги <script>
CKEDITOR.config.protectedSource.push(/<(script)[^>]*>.*<\/script>/ig);
// разрешить php-код
CKEDITOR.config.protectedSource.push(/<\?[\s\S]*?\?>/g);
// разрешить любой код: <!--dev-->код писать вот тут<!--/dev-->
CKEDITOR.config.protectedSource.push(/<!--dev-->[\s\S]*<!--\/dev-->/g);
CKEDITOR.config.allowedContent = true;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question