Hi all!
I would to open the fckeditor in a popup window, with window.showModalDialog.
No problem to do this.
The problem is that i can't upload images from this fckeditor in the popup.
The editor opens another popup but it is completly blank.
Can someone help me?? PLEASE!!!!!
This are some fragments of code
In the main window:
function autoPopup(id_txt, lang) {
var arr = new Array();
arr[0] = document.getElementById(id_txt).value;
arr[1] = id_txt;
arr[2] = lang;
window.showModalDialog("<%=renderRequest.getContextPath()%>/html/editor.html", arr, "dialogWidth:800px;dialogHeight:400px");
}
No problem
In the popup window:
<html>
<head>
<title>Editor</title>
<script type="text/javascript" src='/html/js/editor/fckeditor/fckeditor.js'>
</script>
<script type="text/javascript">
oFCKeditor = new FCKeditor( 'message-body' );
oFCKeditor.BasePath = '/html/js/editor/fckeditor/' ;
oFCKeditor.Height = '400px';
oFCKeditor.Width = '800px';
function riempi_editor(){
var arr = window.dialogArguments;
id_txt = arr[1];
var txt = arr[0];
lang = arr[2];
document.getElementById("message-body").value = txt;
oFCKeditor.ReplaceTextarea();
}
</script>
<basefont size=2 face=Tahoma>
</head>
<body onload="riempi_editor();">
<form>
<textarea rows="50" cols="50" name="message-body" id="message-body"></textarea>
<input type="text" id="pp"/>
</form>
</body>
</html>
I would to open the fckeditor in a popup window, with window.showModalDialog.
No problem to do this.
The problem is that i can't upload images from this fckeditor in the popup.
The editor opens another popup but it is completly blank.
Can someone help me?? PLEASE!!!!!
This are some fragments of code
In the main window:
function autoPopup(id_txt, lang) {
var arr = new Array();
arr[0] = document.getElementById(id_txt).value;
arr[1] = id_txt;
arr[2] = lang;
window.showModalDialog("<%=renderRequest.getContextPath()%>/html/editor.html", arr, "dialogWidth:800px;dialogHeight:400px");
}
No problem
In the popup window:
<html>
<head>
<title>Editor</title>
<script type="text/javascript" src='/html/js/editor/fckeditor/fckeditor.js'>
</script>
<script type="text/javascript">
oFCKeditor = new FCKeditor( 'message-body' );
oFCKeditor.BasePath = '/html/js/editor/fckeditor/' ;
oFCKeditor.Height = '400px';
oFCKeditor.Width = '800px';
function riempi_editor(){
var arr = window.dialogArguments;
id_txt = arr[1];
var txt = arr[0];
lang = arr[2];
document.getElementById("message-body").value = txt;
oFCKeditor.ReplaceTextarea();
}
</script>
<basefont size=2 face=Tahoma>
</head>
<body onload="riempi_editor();">
<form>
<textarea rows="50" cols="50" name="message-body" id="message-body"></textarea>
<input type="text" id="pp"/>
</form>
</body>
</html>