Hello everybody
I just integrate CKEditor with Janiculum View Aspect of Roma Meta Framework.
for more information about ROMA <<META>> FRAMEWORK
see http://www.romaframework.org/
I had some integration-problems for specificity of Roma-Ajax Engine.
1) For all Ajax calling that replace the component i had to manage the removing of the "old editor", if present, before create new.
[color=#FF0000]var ed = CKEDITOR.instances.${janiculum.id("content")}; if (ed != undefined) { CKEDITOR.remove(ed); } $('#${janiculum.id("content")}').ckeditor();[/color]
2) The editor didn't decorate the starting textarea, but substitute this with a new frame in another place, so every change in the editor don't imply a change of the old (now hidden) textarea. This create a binding data problem.
Our solution was to copy the data from the editor on the old (now hidden) textarea via javascript, jumping the "proxi" on jquery access to old textarea via "pure javascript". And later throw the onChange event of the old textarea to hang to Roma Ajax event endling.
This every key-press on edit.
[color=#BF0000]ed = CKEDITOR.instances.${janiculum.id("content")}; ed.on('key', function ( e ) { var myTextField = document.getElementById('${janiculum.id("content")}'); myTextField.value = ed.getData(); var fun = $('#${janiculum.id("content")}').attr("onChange"); eval(fun+";");[/color]