I am trying to use CKeditor with steering templates so that users can customize messages in our application.
CKEditor does some weird stuff
He turns this:
<table> <thead> <tr> <td>Activity</td> <td>Quantity</td> <td>Rate</td> <td>Amount</td> </tr> </thead> <tbody> {{line_items}} </tbody> </table>
In it:
{{line_items}} <table> <thead> <tr> <td>Activity</td> <td>Quantity</td> <td>Rate</td> <td>Amount</td> </tr> </thead> <tbody></tbody> </table>
Then googling made me use config.protectedSource to protect all the rudders.
CKEDITOR.replace('template_body', { //... other stuff protectedSource: [ /{{[\s\S]*?}}/g ] }
This option correctly protects the handle marks from being moved or deleted, but then prevents them from being viewed / edited!
CKEditor hides a protected source in edit mode and shows it in source mode! this is mistake? Can I see {{}} in the original editor mode, but not in normal mode?
source share