Don't know if this is of any use to anyone, but here is how to substitute eWebEditPro with FCKeditor. Any comments/suggestions on the following will be appreciated. Hope this will be of use to someone...
Changes made to FCKeditor (version 1.6) to simplify transition from ektron's eWebEditPro:
For those not familiar with eWebEditPro I will give a brief explanation of how it works:
eWebEditPro is an activeX component that is installed client side and performs all web content editing client side. The
content to be edited is passed directly to the editor without posting data to the server. Once editing is completed, the
edited content is passed back to the originating content management system webpage from which it can be saved.
As of yet FCKEditor does not have this functionality and to be able to substitute eWebEditPro a few modifications are needed
as described below. (In this case the .Net Framework is used and the CMS webpages are in VB.Net).
From the content management system webpage a new window must be opened containing the FCK Editor, passing to it the name of
the textbox containing the content to be modified.
window.open("Editor.aspx?field="+"TextBoxName", "Editor")
This opens a popup window containing the FCKEditor, to which however the content to be edited has still not been transferred.
In this case the content is never posted back to the server but transferred client side using javascript. The only problem in
achieving this is that it is necessary to await for the editor to be completely finished loading before trying to transfer
the content. This is all achieved using the following code inserted in the codebehind of the Editor.aspx page:
Dim script As String = "<script language=JavaScript> "
script += "function WaitforEditor(){ "
script += "if((document.frames['FCKFrameName'].objContent) && (document.frames['FCKFrameName'].objContent.DOM) &&
(document.frames['FCKFrameName'].objContent.DOM.body)) {"
script += "document.frames['FCKFrameName'].objContent.DOM.body.innerHTML=window.opener.document.getElementsByName('" +
Request.QueryString("field") + "')[0].value} "
script += "else{setTimeout(""WaitforEditor()"",1000);}} "
script += " WaitforEditor();"
script += "</script>"
Me.RegisterStartupScript("Startup", scriptString)
To work the script requires that an id be given to the frame in which FCKEditor is contained (to be able to reference it from
javascript). Using the C# version of FCKEditor, the following line must be modified in FredCK.FCKeditor.cs:
<IFRAME src=\"{0}\" width=\"{1}\" height=\"{2}\" frameborder=\"no\" scrolling=\"no\" ></IFRAME>
to read:
<IFRAME src=\"{0}\" width=\"{1}\" height=\"{2}\" frameborder=\"no\" scrolling=\"no\" id=\"FCKFrameName\"></IFRAME>
Lastly in order to copy the content back to your Content management system you need to modify (in fck_actions.js) the code
for save button as follows:
function save()
{
window.parent.opener.document.FormName.TextBoxName.value=objContent.DOM.body.innerHTML;
window.parent.close();
}
voila! eWebeditPro substituted...
Changes made to FCKeditor (version 1.6) to simplify transition from ektron's eWebEditPro:
For those not familiar with eWebEditPro I will give a brief explanation of how it works:
eWebEditPro is an activeX component that is installed client side and performs all web content editing client side. The
content to be edited is passed directly to the editor without posting data to the server. Once editing is completed, the
edited content is passed back to the originating content management system webpage from which it can be saved.
As of yet FCKEditor does not have this functionality and to be able to substitute eWebEditPro a few modifications are needed
as described below. (In this case the .Net Framework is used and the CMS webpages are in VB.Net).
From the content management system webpage a new window must be opened containing the FCK Editor, passing to it the name of
the textbox containing the content to be modified.
window.open("Editor.aspx?field="+"TextBoxName", "Editor")
This opens a popup window containing the FCKEditor, to which however the content to be edited has still not been transferred.
In this case the content is never posted back to the server but transferred client side using javascript. The only problem in
achieving this is that it is necessary to await for the editor to be completely finished loading before trying to transfer
the content. This is all achieved using the following code inserted in the codebehind of the Editor.aspx page:
Dim script As String = "<script language=JavaScript> "
script += "function WaitforEditor(){ "
script += "if((document.frames['FCKFrameName'].objContent) && (document.frames['FCKFrameName'].objContent.DOM) &&
(document.frames['FCKFrameName'].objContent.DOM.body)) {"
script += "document.frames['FCKFrameName'].objContent.DOM.body.innerHTML=window.opener.document.getElementsByName('" +
Request.QueryString("field") + "')[0].value} "
script += "else{setTimeout(""WaitforEditor()"",1000);}} "
script += " WaitforEditor();"
script += "</script>"
Me.RegisterStartupScript("Startup", scriptString)
To work the script requires that an id be given to the frame in which FCKEditor is contained (to be able to reference it from
javascript). Using the C# version of FCKEditor, the following line must be modified in FredCK.FCKeditor.cs:
<IFRAME src=\"{0}\" width=\"{1}\" height=\"{2}\" frameborder=\"no\" scrolling=\"no\" ></IFRAME>
to read:
<IFRAME src=\"{0}\" width=\"{1}\" height=\"{2}\" frameborder=\"no\" scrolling=\"no\" id=\"FCKFrameName\"></IFRAME>
Lastly in order to copy the content back to your Content management system you need to modify (in fck_actions.js) the code
for save button as follows:
function save()
{
window.parent.opener.document.FormName.TextBoxName.value=objContent.DOM.body.innerHTML;
window.parent.close();
}
voila! eWebeditPro substituted...
RE: eWebEditPro migration
Now we should look for something else to "SPEND" our money into
That was very helpful. Thanks a lot.