i have been searching fr a solution to insert HTML to FCK-editor from the outside. finally a have found this:
FCKeditor1___Frame.FCK.InsertHTML();
works quite well in IE, but in Mozilla/Firefox it doesn't! it seems mozilla doesn't recognize the javascript-generated iframe "FCKeditor1___Frame" although it is there. any solutions?
FCKeditor1___Frame.FCK.InsertHTML();
works quite well in IE, but in Mozilla/Firefox it doesn't! it seems mozilla doesn't recognize the javascript-generated iframe "FCKeditor1___Frame" although it is there. any solutions?
RE: Insert HTML from outside (Mozilla)
....
var FCKeditor1 = new FCKeditor('MyEditor','100%',150,'Default',null)
var fck = FCKeditorAPI.GetInstance("MyEditor");
fck.SetHTML(" asdf ");
alert(fck.GetHTML())
....
RE: Insert HTML from outside (Mozilla)
window.onload = function() {
var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples'));
var editor_text = new FCKeditor('text','100%',document.getElementById('text').rows*16+'px');
editor_text.BasePath = sBasePath;
editor_text.ReplaceTextarea();
}
function insert(html) {
FCK = FCKeditorAPI.GetInstance('text');
FCK.InsertHtml(html);
}
RE: Insert HTML from outside (Mozilla)