javascript - Cross browser issue with TinyMCE iframe resize -
after found solution resize tinymce instances ( readonly ). faced problem can't solve hours... when init tinymce ok, in internet explorer , versions of chrome doesn't work
tinymce.init({ mode: "textareas", theme: "advanced", readonly: true, theme_advanced_path: false, theme_advanced_resize_horizontal: false, autoresize: true, width: "870", setup: function(ed) { ed.onloadcontent.add(function(ed, o) { var iframeid = "#" + ($(this).attr('id')) + "_ifr"; $(iframeid).height($(iframeid).contents().find("html").height()); //iframeid.height = iframeid.contentwindow.document.body.scrollheight + "px"; }); } });
also java script attempt bellow jquery not works. more happy if got solution this! in advance!
and here configuration worked me!
tinymce.init({ mode: "textareas", theme: "advanced", theme_advanced_path: false, theme_advanced_resize_horizontal: false, autoresize: true, readonly: true, width: "870", plugins: 'autoresize', autoresize_min_height: "200", autoresize_max_height: "50000", init_instance_callback: function(inst) { inst.execcommand('mceautoresize'); }, setup: function(ed) { ed.onloadcontent.add(function(ed, o) { var iframeid = "#" + ($(this).attr('id')) + "_ifr"; $(iframeid).contents().find("html").children().append("<base target=_blank>"); //the following row not works in ie - $(iframeid).height($(iframeid).contents().find("html").height()); }); } });
Comments
Post a Comment