javascript - Load DIV contents to CKEditor textarea (keep formatting) -


i have ckeditor on forum page. forum items divs, including formatting (strong, h1-6 etc). want make small button @ each post, copies contents of div ckeditor textarea - can copy previous post, update , save new post. forum works bbcode, using bbcode plugin ckeditor. however, whenever load data using jquery

var post = $("div_post_selector").html(); 

and paste ckeditor like

ckeditor.instances.addpost.setdata(post); 

the html code added texteditor, wrong. however, when copy/paste standardly, text added correctly (without html tags, yet keeping format). possibility programatically, without clipboard raping?


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -