I am having a problems with getdata(). It strips styles of all styles except "text-align: justify;" from for example: <p style="font-size: 14pt; font-family: 'Times New Roman'; text-align: justify; ">Test</b>
I initiate a single instance with content proloaded for <div id="content"></div> with:
<script> $(document).ready(function () { CKEDITOR.disableAutoInline = false; CKEDITOR.replace('content', { uiColor: '#C2D6FF' }); }); function mydata() { editor = CKEDITOR.instances.content; var mytext = editor.getData(); alert(mydata); }; </script>
The div content is correct before creating CKEditor instance but is not correct after replace() script execution as observed in firebug.
Can someone offer suggestions on how to correct by configuring, how to load content after creating the CKEditor instance, or what ever?
Thank you.
Maybe ACF is stripping your
Maybe ACF is stripping your styles?
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Further Question: Escaping Post problems
Your earlier response solved my getData() problem. In Replace() I set { allowedContent: true }and styles are not now changed (deleted) on initiation. Thank you.
I still have a problem on post. The character apostophe is used in our application (e.g., John's). When present a post always fails. I have tried escaping with &39;  and %29. None work. If the all 's are deleted, it works. It appears that CKEditor always converts back to ' prior when using getDate() for the jquery $.post that is listed below. Can you provide guidance on how to solve this?
Additional guidance on submit and escape for post will be appreicated.
Thank you.
Still problems escaping on $.post
I have tested and found that content such as John's (apostophe or ' ) gets escaped to &39; as it can be observed within CKEditor in source immediately.
This prevents a post from working, which works if the ( ' )s are removed. I am initiating as below configuring allowedContent and basicEntities as shown. This prevents ACF from stripping styles and from escaping basicEntities ('nbsp', <, >, @). But ( ') is an entities_additional and still gets escaped with basicEntities : false. I suppose I can script it out in javescript, but would be better to configure.
Further guidance would be appreciated. Thank you.