How to make CKeditor not delete a tag?

  • Sound version of the editor please. - lampa
  • @lampa, yes hell knows, yesterday I downloaded the last one from the site .. And, here CKEditor 4.2 (revision f74e558) - sinedsem
  • @Dazar code is inserted through the button "source"? - lampa
  • @lampa, yes - sinedsem

2 answers 2

<script type="text/javascript"> // разрешить теги <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); </script> 
  • and where to embed this code? in config.js? - sinedsem

It may be easier:

 config.protectedSource.push( /<script[\s\S]*?script>/g ); /* script tags */ config.allowedContent = true; /* all tags */ 
  • @Dazar my code in the config, the @VenZell code can be on the plug-in connection page. - lampa
  • @lampa, used your code, everything works, thanks, very much helped out - sinedsem