I want to let user pick picture and return the html code from popup window,
so I made a popup window include fckeditor/fckeditor.js
and create script when user click the picture
function insertImg(img,editor)
{
//img is the image file name
//editor is the fckeditor id from parent window
var htmlSting = '<img src="'+img+'">';
//and I tried many ways below
var oEditor = window.parent.InnerDialogLoaded().FCK ;
var oEditor = InnerDialogLoaded().FCK ;
var oEditor = FCKeditorAPI.GetInstance(editor) ;
var oEditor = window.parent.FCKeditorAPI.GetInstance(editor) ;
oEditor.InsertHtml(htmlSting);
}
and all doesn't work, please help me.
so I made a popup window include fckeditor/fckeditor.js
and create script when user click the picture
function insertImg(img,editor)
{
//img is the image file name
//editor is the fckeditor id from parent window
var htmlSting = '<img src="'+img+'">';
//and I tried many ways below
var oEditor = window.parent.InnerDialogLoaded().FCK ;
var oEditor = InnerDialogLoaded().FCK ;
var oEditor = FCKeditorAPI.GetInstance(editor) ;
var oEditor = window.parent.FCKeditorAPI.GetInstance(editor) ;
oEditor.InsertHtml(htmlSting);
}
and all doesn't work, please help me.