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. Special characters (eg. , , , , ) are not displayed correctly. 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 for the Style Selector?
    11. When I submit a form (where the Editor is embedded), the current content is not submitted.

VIII. FAQ

Special characters (eg. , , , , ) are not displayed correctly. How to fix this problem?

In the previous version of the Editor, we recommended to use Server.HTMLEncode (for ASP) or htmlentities (for PHP) to write a value. In the current version, please use our simple encodeHTML() function. Check our new implementation here.

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:

<script>
var oEdit1 = new InnovaEditor("oEdit1");
oEdit1.dropTopAdjustment=-50;
oEdit1.dropLeftAdjustment=-10;
oEdit1.dropTopAdjustment_moz=-42;
oEdit1.dropLeftAdjustment_moz=-8;
oEdit1.REPLACE("txtContent");
</script>

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, use the Editor's built-in onFullScreen and onNormalScreen events. The onFullScreen event is triggered when the Editor is resized to full screen. The onNormalScreen event 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;">

<script>
var oEdit1 = new InnovaEditor("oEdit1");
oEdit1.REPLACE("txtContent");
</script>

</div>

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

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

<script>
var oEdit1 = new InnovaEditor("oEdit1");
oEdit1.onFullScreen=new Function("doFullScreen()");
oEdit1.onNormalScreen=new Function("doNormalScreen()");
oEdit1.REPLACE("txtContent");
</script>

</div>

As seen on the above code, the onFullScreen event is set to call doFullScreen() function and onNormalScreen event is set to call 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.

<script>
var oEdit1 = new InnovaEditor("oEdit1");
oEdit1.initialRefresh=true;
oEdit1.REPLACE("txtContent");
</script>

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 cmdAssetManager 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 cmdAssetManager property to point to your file manager, for example:

oEdit1.cmdAssetManager="modalDialogShow('/yourfilemanager.php',640,480)";

For more information on cmdAssetManager 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";

when I submit a form (where the Editor is embedded), the current content is not submitted.

This problem persists if you're using a javascript to submit the form, instead of using regular Submit button. The Editor wrap some operation on the form onsubmit event. When using script to submit form, this event didn't get triggered.

To solve this problem, simply call the form onsubmit() just before calling the form submit() method. Below is an example:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<script language="Javascript" src="scripts/innovaeditor.js"></script>
<script language="Javascript">
function doSubmit()
{
//Your custom code here..

document.forms.Form1.onsubmit();
document.forms.Form1.submit()
}
</script>

</head>
<body>
<form method="post" action="post.asp" id="Form1">

<textarea id="txtContent" name="txtContent" rows=4 cols=30></textarea>
<script>
var oEdit1 = new InnovaEditor("oEdit1");
oEdit1.REPLACE("txtContent");
</script>
<input type="button" value="Save" onclick="doSubmit()">
</form>
</body>
</html>



2008, INNOVA STUDIO (www.innovastudio.com). All rights reserved.