Examples | Developer's Guide | ASP.NET Developer's Guide

  1. Getting Started
  2. Applying Stylesheet
  3. Using Asset Manager Add-on
  4. Advanced Settings
  5. Extending the Editor
  6. Toolbar
  7. Localization
  8. FAQ
    1. When using a link button, the Editor content is not submitted. How to fix this problem?
    2. All drop menus & dropdowns are misplaced. How to fix this problem?
    3. When I click the "Full Screen" button, the Editor doesn't open in full screen size. How to fix this problem?
    4. When loading a content into the Editor, sometimes there are lines that disappear (when using IE browser). When I click inside the editor they reappear. How to prevent this behaviour?
    5. Every dialogs give me an error: "Class doesn't support automation", why?
    6. When I click the 'browse' button to open the Asset Manager, I get a message "The page cannot be found". How to fix this problem?
    7. When uploading large file using the Asset Manager, I get an error message: "Request object error 'ASP 0104 : 80004005' Operation not Allowed". How to fix this problem?
    8. Can I replace the Asset Manager add-on with my own File Manager?
    9. When using IE, is it possible to preserve multiple spaces entered in the Editor?
    10. Can I change the hover color/background color for the Style Selector?

VIII. FAQ

When using a link button, the Editor content is not submitted. How to fix this problem?

If you’re using Link Button for submitting a Web Form (where the Editor is embedded), please add the following code on the Page_Load():

Linkbutton1.Attributes.Add("onclick","finish_wysiwyg_editing()")

All drop menus & dropdowns are misplaced. How to fix this problem?

This problem persists if the Editor is embedded in an element (eg. <div>) which has position set to absolute or relative.

Use DropTopAdjustment property and DropLeftAdjustment property to adjust the top and left offsets of the drop menus/dropdowns for previewing in IE and use DropTopAdjustment_moz property and DropLeftAdjustment_moz property to adjust the top and left offsets of the drop menus/dropdowns for previewing in Netscape/Mozilla/Firefox. Below is an example:

<editor:wysiwygeditor
Runat="server"
scriptPath="scripts/"
DropTopAdjustment=-50
DropLeftAdjustment=-50
DropTopAdjustment_moz=-50
DropLeftAdjustment_moz=-50
ID="oEdit1" />

Please make sure also that you include a <!DOCTYPE> declaration in your web page. You can use the following <!DOCTYPE>:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

When I click the "Full Screen" button, the Editor doesn't open in full screen size. How to fix this problem?

This problem persists if the Editor is embedded in an element (eg. <div>) which has position set to absolute or relative.

To solve this problem, set the Editor's built-in onFullScreen and onNormalScreen properties with a custom Javascript command/function we'll create. The onFullScreen command is triggered when the Editor is resized to full screen. The onNormalScreen command is triggered when the Editor is resized back to its original size.

For example, if the Editor is placed inside a <div> element with position is set to relative:

<div style="position:relative;left:100;top:100;">

<editor:wysiwygeditor
Runat="server"
scriptPath="scripts/"
ID="oEdit1" />

</div>

Please add an ID to the <div> element and use the onFullScreen and onNormalScreen properties to call a custom function we'll create.

<div id="idEdit" style="position:relative;left:100;top:100;">

<editor:wysiwygeditor
Runat="server"
scriptPath="scripts/"
onFullScreen="doFullScreen()"
onNormalScreen="doNormalScreen()"
ID="oEdit1" />

</div>

As seen on the above code, the onFullScreen property is set with doFullScreen() function and onNormalScreen property is set with doNormalScreen() function.

Then, in the HEAD section of your web page, you can add:

<script>
function doFullScreen()
{
var idEdit=document.getElementById("idEdit");
idEdit.style.position="";
idEdit.style.left=0;
idEdit.style.top=0;
}
function doNormalScreen()
{
var idEdit=document.getElementById("idEdit");
idEdit.style.position="relative";
idEdit.style.left=100;
idEdit.style.top=100;
}

</script>

As seen on the above code, we remove the position setting of the div element (when the Editor is resized to full screen) and then return the original setting (when the editor is resized back to normal screen).

When loading a content into the Editor, sometimes there are lines that disappear (when using IE browser). When I click inside the editor they reappear. How to prevent this behaviour?

Please set initialRefresh property to true.

<editor:wysiwygeditor
Runat="server"
scriptPath="scripts/"
idEdit.InitialRefresh=true
ID="oEdit1" />

Every dialogs give me an error: "Class doesn't support automation", why?

This problem may occur if the registration information is missing or damaged for some Windows or Internet Explorer files.

To fix this problem, go to "Start", "Run", and in the "Open" box, type the following commands and press enter:

regsvr32 msscript.ocx     [ENTER]
regsvr32 dispex.dll     [ENTER]
regsvr32 vbscript.dll     [ENTER]

When I click the 'browse' button to open the Asset Manager, I get a message "The page cannot be found". How to fix this problem?

Please check the AssetManager property setting. Use 'relative to root' path to specify the location of the Asset Manager add-on page (assetmanager.asp). 'Relative to root' always starts with "/".

When uploading large file using the Asset Manager, I get an error message: "Request object error 'ASP 0104 : 80004005' Operation not Allowed". How to fix this problem?

This may occur if the web server is configured to limit the size of the file that can be uploaded to the server through ASP script (the Request object).

If your web server supports SA-FileUp Component, you can configure the Asset Manager add-on to use the component. Open the assetmanager.asp using your text editor and change this line (line 22):

<!--#include file="i_upload_object_FSO.asp"-->

to:

<!--#include file="i_upload_object_SA.asp"-->

For more information on SA-FileUp Component, check www.softartisans.com.

Can I replace the Asset Manager add-on with my own File Manager?

It depends on your File Manager. This Javascript function needs to be integrated into your File Manager application to return the selected file url:

function selectFile(fileUrl)
{
if(navigator.appName.indexOf('Microsoft')!=-1)
window.returnValue=fileUrl;
else
window.opener.setAssetValue(fileUrl);
self.close();
}

Then, you'd need to set the AssetManager property to point to your file manager, for example:

<editor:wysiwygeditor
Runat="server"
scriptPath="scripts/"
AssetManager="/yourfilemanager.asp"
AssetManagerWidth="600"
AssetManagerHeight="480"
Content="Hello World!"
ID="oEdit1" />

For more information on AssetManager property, check section: Using Asset Manager Add-on.

Please note that integrating you own File Manager is beyond our support scope.


When using IE, is it possible to preserve multiple spaces entered in the Editor?

Yes. Please set:

oEdit1.PreserveSpace=true

Can I change the hover color/background color for the Style Selector?

Yes. Please use styleSelectionHoverFg and styleSelectionHoverBg properties, for example::

oEdit1.styleSelectionHoverFg="red"
oEdit1.styleSelectionHoverBg="green"



© 2003-2005, INNOVA STUDIO (www.InnovaStudio.com). All rights reserved.