Hello girls & guys,
I try to replace a certain tag with another. Problem is the injected code is escaped.
The question is now how can I stop CKEditor from escaping my injected code, or maybe work around?
I inject the code via the following code:
The injected code "before" transformation
But sadly the result is "only"
Thanks for reading,
-lony
I try to replace a certain tag with another. Problem is the injected code is escaped.
The question is now how can I stop CKEditor from escaping my injected code, or maybe work around?
I inject the code via the following code:
afterInit : function( editor ) { var dataProcessor = editor.dataProcessor; htmlFilter = dataProcessor && dataProcessor.htmlFilter; if ( htmlFilter ) { htmlFilter.addRules( { elements : { $ : function( element ) { element.children[0].value = '<script language="JavaScript" type="text/javascript">\n' + ' $(document).ready(function() { .. } );\n' + '</script>\n'; } } }); } }
The injected code "before" transformation
<script language="JavaScript" type="text/javascript"> $(document).ready(function() { .. }); </script>
But sadly the result is "only"
<script language="JavaScript" type="text/javascript"> $(document).ready(function() { .. }); </script>
Thanks for reading,
-lony