I tried to create a onchange event in ckeditor and I succeed. For that while loading the editor I initialize the contents with setData method. Every thing is fine so far. But while loading contents, the variable which holds the editor contents seems to have problem with multi line character.Even though I assign quotes at the beginning and end of the string, only the first line gets quoted, while the remaining lines doesn't sometimes it works, sometimes it doesn't. LInk1 Link2
Meanwhile while assigning these values, while assigning these values
CKEDITOR.on('instanceCreated', function (e) {
e.editor.on('instanceReady', function (ev) {
if(this.id == 'cke_1')
{
set_data = '<?php echo ($esti); ?>';
e.editor.setData(set_data);
}
});
The contents variable gets assigned like this. I tried with removing , replaced single quotes with ' Sometimes it works, sometimes it doesn't