Hi to all.
For my web application I load fckeditor with some reports.
This is my procedure:
In the main.jsp I have
<body onload="javascript: start();">
where,
function start(){
editor.load();
setTimeout("setText()",1000);
}
function setText(){
var text;
text = document.forms[0].elements[hiddenText].value;
if (text != null && text != ""){
editor.setTextArea(text);
}
}
and "editor" is the id of a iframe:
<iframe id="editor" scrolling="no" src="EditorSist.html"></iframe>
Into EditorSist.html this is the "core"
function load(){
iFrameEditor = editor.frames[0].frames[0];
textArea = editor.frames[0].eSourceField;
}
function setTextArea(Text){
iFrameEditor.document.close();
iFrameEditor.document.open();
iFrameEditor.document.write(Text);
}
<iframe id="editor" src="FCK.jsp" scrolling="no"></iframe>
Finally, FCK.jsp contains
var sBasePath = 'FCKeditor/';
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Height = 455;
oFCKeditor.Create() ;
This is my procedure and it works correctly. In other words, the Main.jsp load the text into the editor BUT, some buttons as Cut/Copy/Undo doesn't enable themselves when I select a piece of text. Moreover, the right mouse button click over the tables, doesn't offer the relative table menu.
I add that if I create an empty document (without text loading), all works correctly.
Someone can help me?
Thanks in advance.
For my web application I load fckeditor with some reports.
This is my procedure:
In the main.jsp I have
<body onload="javascript: start();">
where,
function start(){
editor.load();
setTimeout("setText()",1000);
}
function setText(){
var text;
text = document.forms[0].elements[hiddenText].value;
if (text != null && text != ""){
editor.setTextArea(text);
}
}
and "editor" is the id of a iframe:
<iframe id="editor" scrolling="no" src="EditorSist.html"></iframe>
Into EditorSist.html this is the "core"
function load(){
iFrameEditor = editor.frames[0].frames[0];
textArea = editor.frames[0].eSourceField;
}
function setTextArea(Text){
iFrameEditor.document.close();
iFrameEditor.document.open();
iFrameEditor.document.write(Text);
}
<iframe id="editor" src="FCK.jsp" scrolling="no"></iframe>
Finally, FCK.jsp contains
var sBasePath = 'FCKeditor/';
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Height = 455;
oFCKeditor.Create() ;
This is my procedure and it works correctly. In other words, the Main.jsp load the text into the editor BUT, some buttons as Cut/Copy/Undo doesn't enable themselves when I select a piece of text. Moreover, the right mouse button click over the tables, doesn't offer the relative table menu.
I add that if I create an empty document (without text loading), all works correctly.
Someone can help me?
Thanks in advance.