vendredi 30 janvier 2015

Allow Ember syntax into CKEditor

Issue: CKEditor removed Ember.js annotations.


I'm using the inline version of CKEditor with Ember.js. This post explains how to stop CKEditor filter functions: CKeditor strips <i> Tag


I implemented the following solution into the config.js file:



CKEDITOR.editorConfig = function( config ) {
}

CKEDITOR.config.allowedContent = true;


I'm now able to have empty tags with class and id in CKEditor (the tags are use with Font Awesome). However, CKEditor still remove the Ember annotation. Example: I would like to have the below tag in CKEditor:



<i class="fa fa-square-o" {{action "todoToggle"}}></i>


CKEditor still filter the tags and return:



<i class="fa fa-square-o"></i>


Question: How could I have CKEditor retains the {{action "todoToggle"}} annotation?


End goal: My goal is to allow users to click the font awesome sign and change it to another font awesome sign (from todo not complete to todo completed). The {{action "todoToggle"}} allow to create this toggling action with Ember.





Aucun commentaire:

Enregistrer un commentaire