jquery - CKEditor - attach to AJAX loaded content -
i have page has contenteditable
area has ckeditor attached.
what i'm looking do, load page replace current one, loads in contenteditable
div via ajax
this works fine, loaded content, doesn't have ckeditor wysiwyg attached.
<div contenteditable="true" class="content"></div> $.ajax({ type: "post", url: 'load.php', data: "id="+id, success: function(data) { // i've tried using ckeditor config, doesn't load } });
load.php
<div contenteditable="true" class="content"></div>
for dynamically added elements need call ckeditor.inline
. method accepts element (or id) on editor should initialized , config object. see docs.
[added] your dynamically created div or text area
<div contenteditable="true" id="content">...</div>
end js code attach ckeditor
ckeditor.inline( 'content' );
Comments
Post a Comment