I use the WYSIWYG editor CKEditor on my site. I have a problem if I take a javascript script in the editor and I send these changes. It shows me a popup instead of show me the HTML string. I try to encode the text I typed but it encodes all the code created by the editor (bold, underline).
I also tried to use the configuration using the WYSIWYG editor:
config.htmlEncodeOutput = true;
By typing <script> alert ('test') </ script>
in the editor, it displays correctly on the display. But if I want to re-edit my code, he wrote me this in the editor:
<script>alert("test");</script>
Do you have any idea how to fix this?
Try adding this code to ckeditor/config.js:
config.basicEntities = false;
config.entities = false;
Also make sure ACF is setup to not strip your code. More this here:
http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With