Innova Studio Developers Guide
Innova Studio Developers Guide
1 of 3
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
I. Getting Started
I.1. Installation
Unzip the Editor package & copy all files into your web server. You should have the following
folders and files:
Open file default.htm to browse the examples and the documentation. According to several
examples, it is recomended that you copy all files into a virtual directory named Editor in your
web server, so that you can access the examples by opening:
http://yourserver/Editor/default.htm
Note:
InnovaStudio WYSIWYG Editor script is located in folder scripts. You
just need this folder to use the Editor in your web pages.
27/07/2006 4:08 PM
2 of 3
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
</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="submit" value="submit">
</form>
</body>
</html>
As seen on the above code, specify the textarea id as parameter for the REPLACE method.
ASP Example
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language=JavaScript src="../scripts/innovaeditor.js"></script>
</head>
<body>
<form method="post" action="default.asp" id="Form1">
<textarea id="txtContent" name="txtContent" rows=4 cols=30>
<%
function encodeHTML(sHTML)
sHTML=replace(sHTML,"&","&")
sHTML=replace(sHTML,"<","<")
sHTML=replace(sHTML,">",">")
encodeHTML=sHTML
end function
Response.Write encodeHTML(Request("txtContent"))
%>
</textarea>
<script>
var oEdit1 = new InnovaEditor("oEdit1");
oEdit1.REPLACE("txtContent");
</script>
<input type="submit" value="Submit">
</form>
</body>
</html>
PHP Example
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language=JavaScript src='../scripts/innovaeditor.js'></script>
</head>
<body>
<form method="post" action="default.php" id="Form1">
<textarea id="txtContent" name="txtContent" rows=4 cols=30>
<?
function encodeHTML($sHTML)
27/07/2006 4:08 PM
3 of 3
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
{
$sHTML=ereg_replace("&","&",$sHTML);
$sHTML=ereg_replace("<","<",$sHTML);
$sHTML=ereg_replace(">",">",$sHTML);
return $sHTML;
}
if(isset($_POST["txtContent"]))
{
$sContent=stripslashes($_POST['txtContent']); //Remove slashes
echo encodeHTML($sContent);
}
?>
</textarea>
<script>
var oEdit1 = new InnovaEditor("oEdit1");
oEdit1.REPLACE("txtContent");
</script>
<input type="submit" value="Submit">
</form>
</body>
</html>
27/07/2006 4:08 PM
1 of 2
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
{
background:steelblue;
color:white;
font-family:Verdana,Arial,Helvetica;
}
This will apply a background color of "steelblue", font color of "white", and font family of
"Verdana,Arial,Helvetica" to the Editor content as shown in the screenshot below:
27/07/2006 4:12 PM
2 of 2
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
Only HTML selectors will not be included in the Style Selection. For example, the HTML selector P
below will not be included.
P {font-family:Verdana,Arial,Helvetica;}
27/07/2006 4:12 PM
1 of 4
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
27/07/2006 4:13 PM
2 of 4
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
within it:
If you're using PHP, open settings.php (in the assetmanager folder) & set the
sBaseVirtual0 variable with the location of your web assets folder (please use "relative to
root" path). Then specify its real/physical path using sBase0 variable and give a friendly
name/caption using sName0:
$sBaseVirtual0="/assets";
$sBase0="c:/inetpub/wwwroot/assets";
$sName0="Assets";
Important:
Your web asset folder must have Write Permission.
If you enable the Asset Manager add-on, these dialogs will automatically show a Browse button
:
Hyperlink dialog
Image dialog
Insert Flash dialog
Insert Media dialog
Background Image dialog (opened from table and cell properties dialogs)
The Browse button will open the Asset Manager add-on dialog so that you can select a file which
can be inserted as hyperlink or object (image, flash, video, etc).
27/07/2006 4:13 PM
3 of 4
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
seetings.asp
arrBaseFolder(0)="/assets/"
arrBaseName(0)="Assets"
arrBaseFolder(1)="/public_assets/"
arrBaseName(1)="Public Assets"
or
settings.php
$sBaseVirtual0="/assets";
$sBase0="c:/inetpub/wwwroot/assets";
$sName0="Assets";
$sBaseVirtual1="/public_assets";
$sBase1="c:/inetpub/wwwroot/public_assets";
$sName1="Public Assets";
III.3. Localization
If required, you can localize the Asset Manager add-on to be displayed in specific language by
setting the lang variable in querystring:
ASP Example
<script>
var oEdit1 = new InnovaEditor("oEdit1");
oEdit1.cmdAssetManager="modalDialogShow
('/assetmanager/assetmanager.asp?lang=german',640,445);";
oEdit1.REPLACE("txtContent");
</script>
or
PHP Example
<script>
var oEdit1 = new InnovaEditor("oEdit1");
oEdit1.cmdAssetManager="modalDialogShow
('/assetmanager/assetmanager.php?lang=german',640,445);";
oEdit1.REPLACE("txtContent");
</script>
The current available values lang variable are: danish, dutch, finnish, french, german, schi
(Chinese Simplified), tchi (Chinese Traditional), norwegian, spanish, swedish. If lang variable is
not specified, English version will be displayed.
seetings.asp
bReturnAbsolute=true
27/07/2006 4:13 PM
4 of 4
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
or
settings.php
$bReturnAbsolute=true;
This will make the Asset Manager dialog returns:
http://yourservername/assets/image.gif
Inserting images using absolute path usually is required if you use the Editor in web-based email
applications.
2003-2005, INNOVA STUDIO (www.InnovaStudio.com). All rights reserved.
27/07/2006 4:13 PM
1 of 4
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
V.
VI.
VII.
VIII.
Getting Started
Applying Stylesheet
Using Asset Manager Add-on
Advanced Settings
1. Setting the Editing Mode
2. Loading Content at Runtime
3. Getting the Current Content
4. Editing & Publishing Path
5. Line Break
6. Spell-Checking Integration
7. Setting the Editor Focus
8. Adding Custom Color Selection
Extending the Editor
Toolbar
Localization
FAQ
By default, the Editing Mode is set to HTMLBody. To specify the editing mode, use mode property.
For example:
<script>
var oEdit1 = new InnovaEditor("oEdit1");
oEdit1.mode="HTML";
oEdit1.REPLACE("txtContent");
</script>
Editing full HTML content is useful if you wish to save the content as a static html file. However, in
many dynamic web applications today (e.g. in database-driven web applications or web content
management systems where the ability to manage certain/specific area is required), the HTMLBody
or XHTMLBody editing modes are more likely to be used.
27/07/2006 4:13 PM
2 of 4
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
27/07/2006 4:13 PM
3 of 4
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
False <DIV> *
False
False <P>
True
True
<BR>
False
True
<BR>
27/07/2006 4:13 PM
4 of 4
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
27/07/2006 4:13 PM
1 of 3
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
Getting Started
Applying Stylesheet
Using Asset Manager Add-on
Advanced Settings
Extending the Editor
1. Calling the Editor Object from a Popup/Window dialog
2. Inserting Custom Content
a. Inserting Custom Tags
b. Inserting Custom Links
c. Inserting Custom HTML Content
VI. Toolbar
VII. Localization
VIII. FAQ
27/07/2006 4:15 PM
2 of 3
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
27/07/2006 4:15 PM
3 of 3
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
As seen on the code, we created a function doInsert() and then get the Editor object to be able
to call the insertLink() method.
V.2.c. Inserting Custom HTML Content
InnovaStudio WYSIWYG Editor allows you to insert custom HTML into the current Editor content.
For this purpose, use the insertHTML() method. For example, this dropdown will insert custom
html content into the Editor:
<select onchange="oUtil.obj.insertHTML(this.value)">
<option value="" selected>Insert..</option>
<option value="<h1>InnovaStudio</h1>">Company Name</option>
<option value="<img src='/images/logo.gif' />">Company Logo</option>
</select>
In the above example, we called the oUtil.obj directly, not using window.opener.oUtil.obj or
dialogArguments.oUtil.obj (since it is implemented in the same page where the Editor is
embedded, not implemented in a popup/dialog). You can also call the Editor object name directly,
for example: oEdit1. However, using oUtil.obj is recommended if you have multiple instances
of the Editor since it will refer to the current/active Edtor object (where the cursor is placed).
You can also create a custom lookup page which list your custom html content that can be
inserted into the current Editor content. For this purpose, InnovaStudio WYSIWYG Editor has a
'Custom Object' button which can be enabled to open your own custom html Lookup page. To
enable the 'Custom Object' button, set the cmdCustomObject property with command to open
your custom lookup page :
<script>
var oEdit1 = new InnovaEditor("oEdit1");
oEdit1.cmdCustomObject="modelessDialogShow('objects.htm',365,250)";
oEdit1.REPLACE("txtContent");
</script>
27/07/2006 4:15 PM
1 of 7
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
Getting Started
Applying Stylesheet
Using Asset Manager Add-on
Advanced Settings
Extending the Editor
Toolbar
1. Configuring the Toolbar Buttons
2. Adding Custom Buttons
3. Tag Selector Settings
VII. Localization
VIII. FAQ
VI. Toolbar
VI.1. Configuring Toolbar Buttons
You can show/hide toolbar buttons using 2 ways:
1. By setting true/false to the appropriate properties. For example, this will show the "Clear All"
button:
<script>
var oEdit1 = new InnovaEditor("oEdit1");
oEdit1.btnClearAll=true;
oEdit1.REPLACE("txtContent");
</script>
The "Clear All" button is disabled by default. As seen on the above example, to enable/show
the "Clear All" button, we set btnClearAll property to true. Please Note that some toolbar
buttons are disabled by default. Please refer to the button list at the end of this section.
2. By specifying the name of the buttons you'd like to display using features property. Using the
features property, you specify also the button ordering, as well as button spaces and toolbar
line breaks. Below is an example:
<script>
var oEdit1 = new InnovaEditor("oEdit1");
oEdit1.features=["FullScreen","Preview","Print","Search",
"Cut","Copy","Paste","PasteWord","PasteText","|","Undo","Redo","|",
"ForeColor","BackColor","|","Bookmark","Hyperlink","XHTMLSource","BRK",
"Numbering","Bullets","|","Indent","Outdent","LTR","RTL","|",
"Image","Flash","Media","|","Table","Guidelines","Absolute","|",
"Characters","Line","Form","RemoveFormat","ClearAll","BRK",
"StyleAndFormatting","TextFormatting","ListFormatting","BoxFormatting",
"ParagraphFormatting","CssText","Styles","|",
"Paragraph","FontName","FontSize","|",
"Bold","Italic","Underline","Strikethrough","|",
"JustifyLeft","JustifyCenter","JustifyRight","JustifyFull"];
oEdit1.REPLACE("txtContent");
</script>
Note:
Use "|" for Space Break and "BRK" for Line Break.
27/07/2006 4:16 PM
2 of 7
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
For a list of button names, please refer to the button list below.
List of buttons (includes also menu items & dropdowns):
Icon
Description
Name
Property
Default Va
"Save" button.
Save
btnSave
false
"Full Screen"
button.
FullScreen
btnFullScreen
true
btnPreview
true
"Print" button.
btnPrint
false
"Search" button.
Search
btnSearch
true
"Spell Check"
button.
SpellCheck
btnSpellCheck
false
StyleAndFormatting
(No Property)
"Style &
Formatting"
button.
This button
opens a menu
which has:
"Text
Formatting"
menu item
"List
Formatting"
menu item
"Box
Formatting"
menu item
"Paragraph
Formatting"
menu item
"Custom
Css" menu
item
27/07/2006 4:16 PM
3 of 7
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
btnTextFormatting
true
"Paragraph
Formatting"
menu item.
"List Formatting"
menu item.
ListFormatting
btnListFormatting
true
"Box Formatting"
menu item.
BoxFormatting
btnBoxFormatting
true
"Custom Css"
menu item.
CssText
btnCssText
true
"Cut" button.
Cut
btnCut
true
"Copy" menu
item.
Copy
btnCopy
true
"Paste" button.
Paste
btnPaste
true
"Paste from
Word" button.
PasteWord
btnPasteWord
true
27/07/2006 4:16 PM
4 of 7
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
"Paste Text"
button.
PasteText
btnPasteText
false
"Undo" button.
Undo
btnUndo
true
"Redo" button.
Redo
btnRedo
true
"Text Color"
button.
ForeColor
btnForeColor
true
"Text Background
BackColor
Color" button.
btnBackColor
true
"Bookmark"
button.
Bookmark
btnBookmark
true
"Hyperlink"
button.
Hyperlink
btnHyperlink
true
"Custom Tag"
button.
CustomTag
(No Property)
"Image" button.
Image
btnImage
true
"Flash" button.
Flash
btnFlash
false
"Media" button.
Media
btnMedia
false
"Internal Link"
button.
InternalLink
(No Property)
"Custom Object"
button.
CustomObject
"Table" button.
Table
btnTable
true
"Guidelines"
button.
Guidelines
btnGuidelines
true
"Absolute"
button.
Absolute
btnAbsolute
true
"Secial
Characters"
button.
Characters
btnCharacters
true
"Horizontal Line"
button.
Line
btnLine
true
27/07/2006 4:16 PM
5 of 7
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
"Form" button.
Form
btnForm
true
"Remove
Formatting"
button.
RemoveFormat
btnRemoveFormat
true
XHTMLFullSource
(No Property)
"Source Editor"
button for full
HTML editing.
"Source Editor"
button for HTML
BODY content
editing.
XHTMLSource
(No Property)
"Clear All"
button.
ClearAll
btnClearAll
false
"Style Selection"
button.
Styles
btnStyles
false
"Paragraph"
dropdown.
Paragraph
btnParagraph
true
"Font" dropdown.
FontName
btnFontName
true
"Font Size"
dropdown.
FontSize
btnFontSize
true
"Bold" button.
Bold
btnBold
true
"Italic" button.
Italic
btnItalic
true
"Underline"
button.
Underline
btnUnderline
true
27/07/2006 4:16 PM
6 of 7
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
"Strikethrough"
button.
Strikethrough
btnStrikethrough
false
"Superscript"
button.
Superscript
btnSuperscript
false
"Subscript"
button.
Subscript
btnSubscript
false
"Justify Left"
button.
JustifyLeft
btnJustifyLeft
true
"Justify Center"
button.
JustifyCenter
btnJustifyCenter
true
"Justify Right"
button.
JustifyRight
btnJustifyRight
true
"Justify Full"
button.
JustifyFull
btnJustifyFull
true
"Numbering"
button.
Numbering
btnNumbering
true
"Bullets" button.
Bullets
btnBullets
true
"Indent" button.
Indent
btnIndent
true
"Outdent"
button.
Outdent
btnOutdent
true
"Left to Right"
button.
LTR
btnLTR
false
"Right to Left"
button.
RTL
btnRTL
false
27/07/2006 4:16 PM
7 of 7
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
Button Name
Command to execute
Caption
Image/icon (You'd need to create your own image or you can use the provided
btnCustom1.gif btnCustom7.gif)
You can re-arrange the custom buttons at any position on the toolbar by setting the features
property.
27/07/2006 4:16 PM
1 of 2
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
Getting Started
Applying Stylesheet
Using Asset Manager Add-on
Advanced Settings
Extending the Editor
Toolbar
Localization
FAQ
VII. Localization
You can localize the Editor to be displayed in specific language by adding a language include file
before the Editor javascript include:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="Javascript" src="scripts/language/german/editor_lang.js"><
<script language="Javascript" src="scripts/innovaeditor.js"></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="submit" value="submit">
</form>
</body>
</html>
The current available language include files are:
Danish
<script language="Javascript" src="scripts/language/danish/editor_lang.js"></scri
Dutch
<script language="Javascript" src="scripts/language/dutch/editor_lang.js"></scrip
Finnish
<script language="Javascript" src="scripts/language/finnish/editor_lang.js"></scr
French
<script language="Javascript" src="scripts/language/french/editor_lang.js"></scri
German
<script language="Javascript" src="scripts/language/german/editor_lang.js"></scri
Norwegian
27/07/2006 4:17 PM
2 of 2
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
27/07/2006 4:17 PM
1 of 5
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
Getting Started
Applying Stylesheet
Using Asset Manager Add-on
Advanced Settings
Extending the Editor
Toolbar
Localization
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 perists if the Editor is embedded in an element (eg. <div>) which has position set to
absolute or relative.
27/07/2006 4:18 PM
2 of 5
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
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 perists if the Editor is embedded in an element (eg. <div>) which has position set to
27/07/2006 4:18 PM
3 of 5
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
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");
27/07/2006 4:18 PM
4 of 5
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
idEdit.initialRefresh=true;
oEdit1.REPLACE("txtContent");
</script>
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.
27/07/2006 4:18 PM
5 of 5
http://www.trustech.org/WebasedDir/WebFileExplore/Editor/documen...
Please note that integrating you own File Manager is beyond our
support scope.
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 perists 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>
27/07/2006 4:18 PM