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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -