I've been working for DAYS to get ckeditor to work within an application that we have. The editor instance is on a template, which is loaded via ajax. The content of the editor is stored in a coldfusion session variable. If I enter the value of the variable between the opening and closing textarea tags, it works fine. If I enter the coldfusion session variable between the opening and closing textareas, the editor manages to hose up the anchor tags.
Example of content as it should be:
This is my content.
My content has lots of content. It also has links. You can click on the links.
This is the end of my content with another link.
Example of 'hosed up' content:
This is my content.
My content has lots of content. It also has links. You can click on the links.
Hopefully that conveys the problem well enough. I have tried this nearly every way possible. My instance is integrated with jQuery as well. Here is how I am population the editor at present:
<script type="text/javascript">
(function($){
$(function(){
CKEDITOR.on( 'instanceCreated', function( event ) {
var editor = event.editor,
element = editor.element;
editor.on( 'configLoaded', function() {
editor.config.toolbar = 'Full'
});
});
CKEDITOR.inline('editorBody');
});
}(jQuery));
</script>
<textarea class="editorBody" id="editorBody" name="editorBody"></textarea><script type="text/javascript">
(function($){
$(function(){
setTimeout(function(){
CKEDITOR.instances.editorBody.setData('#jsStringFormat(session.ckeditor_content)#');}, 1500);
});
}(jQuery));
</script>
Any help would be GREATLY appreciated. Thank you all in advance.
Respectfully,
Brain