ajax - wysihtml5 - setting a value won't work, because 'sandbox iframe isn't loaded yet' -


i'm working on little webservice. therefore using ajax call , append data table on website. here can read , update existing entries or write new entries. works fine.

i want have possibility update existing wysihtml5 editor. integrated editor on website , can use on new entries. works, too.

but there's problem existing data. when comes form update data, want existing data being displayed value. works fine on inputs, wysihtml5 don't work.

i know there's iframe , that's why can't set value of textarea. searched solution , found following code (last line):

var editor = new wysihtml5.editor("textareaid", { // id of textarea element         toolbar: "wysihtml5-toolbar", // id of toolbar element         parserrules: wysihtml5parserrules, // defined in parser rules set });  editor.setvalue('here's content', true); 

usually should work, no content appears , console tells me:

error: wysihtml5.sandbox: sandbox iframe isn't loaded yet

i tried timeout-function nothing works. searching on internet seems there noone else problem. hope can me out, great!

is there way set value?

this code work me

$("#product_details").data("wysihtml5").editor.getvalue();// value $("#product_details").data("wysihtml5").editor.setvalue('new content')// set value 

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -