Web Editor Control 6 FAQ

[Q] How do the security settings of Internet Explorer affect the program distribution? (OS: Windows)

Web Editor Control is a component program using Microsoft's ActiveX protocol. Thus, the security settings of Internet Explorer that affect ActiveX Controls may limit the use of the program. You need to make sure that installation of the program is not blocked by the security settings.

In Internet Explorer, select the Tools-Internet Options...-Security menu item.

The following example is based on Internet Explorer 5.

If the security level is set to 'Default Level', you can install and use Web Editor Control 6 with no problem. If the security level is set to 'Custom', make sure that [Download signed ActiveX controls] is set to 'Enable' or 'Prompt'.

Also, make sure that [Run ActiveX controls and plug-ins] is set to 'Enable'.

[Q] Which script language should I use: PHP, JSP, ASP, or Java Servlet? How does the script language work with databases? (OS: Windows/Unix/Linux; Language: PHP, JSP, ASP)

Basically, Web Editor Control runs in the browser (client-side), so which server-side script and type of server are used is insignificant. However there are some differences in how data is processed.

Web Editor Control uses MIME to deliver HTML contents and attached files together. It encodes multiple files into a single MIME file, and sends it to the server. The server receives the file and decodes it with a MIME decoder. Depending on the type of server-side script used, there might be differences in the decoding method.

For Windows servers, Web Editor Control provides its own COM-based MIME object which encodes and decodes MIME. This library is only for Windows servers with PHP 4 or higher, ASP, Visual C++, or Visual Basic. For Unix/Linux servers, you have to use other libraries for MIME decoding.

When saving data into the database, you can use the same method that you use for saving form data.

[Q] What is the difference between specifying the settings in the registry and specifying them in the Initialization (.env) File? (OS: Windows/Unix/Linux)

Web Editor Control uses an Initialization File to define its settings. However you may find some of these settings are not applied when you use Web Editor Control. This is because settings in the registry have priority over those in the Initialization File.

Settings in the registry are specified by the client users, using the Tools-Preferences... menu item of Web Editor Control.

[Q] How do I upgrade the Initialization File? (OS: Windows/Unix/Linux)

Two parameters should be specified when specifying the Initialization File in the HTML document. One is the location of the file and the other is its version.

Web Editor Control refers to the version number to decide whether or not to download the Initialization File. A new Initialization File is downloaded if the version number is higher than before.

 

// Before upgrade

    <OBJECT id="wec" codeBase=NamoWec.cab#version=4,0,0,27 classid=CLSID:C5AC95C0-C873-445B-BA1F-3A430A4DEA42 width="100%" height=400>

    <PARAM NAME="InitFileURL" VALUE="namowec.env">

    <PARAM NAME="InitFileVer" VALUE="1.0">

    </OBJECT>

     

// After upgrade

    <OBJECT id="wec" codeBase=NamoWec.cab#version=4,0,0,27 classid=CLSID:C5AC95C0-C873-445B-BA1F-3A430A4DEA42 width="100%" height=400>

    <PARAM NAME="InitFileURL" VALUE="namowec.env">

    <PARAM NAME="InitFileVer" VALUE="1.1">

    </OBJECT>

[Q] When upgrading Web Editor Control (Namo WebEditor Control) version 2.x to version 5.0, what should I do on the client side for the upgrade? (OS: Windows/Unix/Linux)

Some functions of the 2.x version have been modified or removed. Therefore, there might be need for modification of the source code.

[Q] Is there an equivalent of namomime.dll for Unix servers? (OS: Unix/Linux)

At present, Namo Interactive does not supply a MIME encoder/decoder for UNIX/LINUX.

[Q] Can I preserve an unfinished document before navigating to a different Web page? (OS: Windows; Language: VBScript, JScript, VisualC, VisualBasic)

Yes. You can use the SaveState and RestoreSate methods to save the current session. These methods allow you to restore a session that was saved within 10 minutes. Refer to the Web Editor Control 6 Developer's Guide for more information.

[Q] When using Web Editor Control with script languages, which one is better: VBScript or JScript?

Web Editor Control 6 supports the Microsoft COM protocol. Any languages that support the COM protocol can be used. In Internet Explorer you can use either VBScript or JScript. (JavaScript has some difficulties in use.)

No significant difference exists between the two methods. JavaScript cannot process Web Editor Control events. JScript can, but it is not the usual way. Except for event handling, VBScript and JScript can be used with equal facility.

[Q] Why is the DefaultFont setting in my Initialization File not applied?

If a user specifies the default font with the Tools-Preferences... menu item, the settings will be saved in the registry and applied to the program as a default. In this case, the DefaultFont setting in the Initialization File will not apply. To use this setting you have to delete the default font information in the registry.

Similarly, font settings specified by the SetDefaultFont method will be superseded by the default font settings in the registry.

[Q] When the Initialization File is loaded with the LoadInitFile Method, why is the LineHeight property not applied? (OS: Windows/Unix/Linux; Language: VBScript, JScript)

LineHeight is a property of the Document section of the Initialization File. Properties in the Document section cannot be applied to the current document (or any time after the OnInitCompleted message) even if the Initialization File is loaded. The settings will be applied to documents which are created after LoadInitFile is loaded.

Refer to the Web Editor Control API documentation for more information on the LoadInitFile method.

[Q] Why are settings specified in the Initialization File not applied? (OS: Windows; Web Server: IIS)

IIS in Windows 2000 or higher doesn't allow downloading files except for MIME types which are specified in advance. This blocks the downloading of the Initialization File.

You need to add the ENV file type in IIS's MIME Map.

1) Open Start-Settings-Control Panel-Administrative Tools, and double-click Internet Services Manager.

2) Click File Types... under MIME Map.

3) Click New Type....

4) Specify the Associated extension and content type as shown above, and click OK.

[Q] I have a Web Editor Control control in a layer (<div> element). If the layer is edited and moved after the web page is loaded, Internet Explorer closes or Web Editor Control is not properly displayed. Why?

Several initialization processes for Web Editor Control are done when the web page is loaded. It is encouraged to change any value of the Web Editor Control after initialization is over (after OnInitCompleted).

Edit or move the layer on the WEC_OnInitCompleted message rather than on Windows_OnLoad. Refer to the OnInitCompleted API description for more information.

[Q] How do I disable some of Web Editor Control's menu commands?

Use the DeleteCommand property in the Initialization File. Menus specified in this property are disabled, and are not shown in the menu bar.

[UI]

 

DeleteCommand = file_new, file_open, image

In this example, New File, Open File, and Insert Image are disabled. Refer to the Developer's Guide for more information.

[Q] I want to make a Windows program using Namo Web Editor Control. What tools can I use?

You can use any tools that support ActiveX controls: Visual C++ 6.0, Visual Basic 6.0, and Delphi, to name a few.

One thing you should be aware of is that unlike when using Web Editor Control on a Web page, you should have a Design-Time License to include Web Editor Control in a Windows application. Please send e-mail to activex@namo.com for more information.

In Windows applications, an LPK file is not required, and the initialization has to be done with the LoadInitFile method.

[Q] How do I allow users to use the Open Template feature?

Open Template opens a pre-designed document template. The Web Editor Control administrator determines whether templates are used. The administrator should take the following actions to enable users to use the Open Template feature.

  •   Decide where the template files should be saved. It is suggested to save all the template documents in a specific directory of the Web server.
  •   Create the template documents and save them in the specified location.
  •   Plan the folder structure (category) of the template documents.
  •   Create a Template.ini file, which defines the category and location of the template documents.
  •   Specify the location of Template.ini using the TemplateInUrl property.

Using the Lock Cell/Table feature lets users easily recognize the editable and fixed parts of the document template and makes it possible to preserve the basic structure of the document.

[Q] How do I create a company document template using the Table Lock or Cell Lock feature?

Tables are often inserted in document templates or forms such as an estimate sheet or memorandum. These documents consist of the parts to be filled in and other parts that are not to be modified. In the following table, the first and third columns should not be modified, while the second and fourth columns should be filled in.

Team

 

Phone Number

 

Position

 

Name

 

 

In the above case, the Lock Cell feature is very useful because applying the Lock Cell command makes the target cells completely uneditable. To lock the cells, select the cells and select {Lock-Lock Table} in the shortcut menu.

img6.gif

Also, applying Lock Table prevents users from editing table properties such as table color. If both the Lock Cell and Lock Table commands are applied, two icons appear as shown below.

img8.gif

[Q] How do I upload a Web document and resource files to an FTP server?

Web Editor Control provides various methods and properties for you to upload a document along with its resource files (images, style sheets, multimedia files, etc.) to an FTP server. You need to specify the proper settings for uploading files to the FTP server using properties such as FtpFileScope, FtpFileFilter, FtpOverwrite, FtpPort, FtpPassiveMode, FtpUserName, and FtpPassword. Each of the properties is described below.

API Name

Type

Description

FtpFileScope

Property

In the case of FTP transmission, checks the range of location of the inserted file, then decides whether to start the transmission depending on the range of the location.

FtpFileFilter

Property

Gets or sets the type of the inserted file.

FtpOverwrite

Property

Decides the next action in case a file with the same name exists on the FTP server.

FtpPort

Property

Sets the port number of FTP server.

FtpPassiveMode

Property

Sets whether to use passive mode, or gets the prior setting.

FtpUserName

Property

Sets the user name to login, or gets the current value.

FtpPassword

Property

Sets the password to login, or gets the current value.

 

After setting up the proper environment for the FTP transmission using the properties, you can upload the files using the FtpUpload method.

API Name

Type

Description

FtpUpload

Method

Uploads the files to the FTP server.

 

An example VBScript for uploading files to an FTP server using the properties and methods is shown below.

dim files()
dim object
set object = Document.editForm

 

object.wec.FtpFileScope = 0                      ' Upload files that are only in the local server.
object.wec.FtpFileFilter = 0                        ' Upload only the HTML files, no attached file.

object.wec.FtpOverwrite = 0                       ' Change the file name, if the same filename exists on the FTP.
object.wec.FtpPassiveMode = 1                ' Use passive mode.
object.wec.FtpPort = 21                               ' FTP port number is 21.
object.wec.FtpUserName = "admin"         ' Administrator's ID is admin.
object.wec.FtpPassword = "adminxxx"     ' Administrator's password is adminxxx.
object.wec.FtpUpload "www.myhome.co.kr", "/public_html", "index.htm"   ' Upload to FTP.

 

[Q] Why does the message "Restart Your Computer" appear during Web Editor Control installation?

This message appears if you install a newer version of Web Editor Control over an older version. In such cases, locked files belonging to the old Web Editor Control installation cannot be replaced without restarting Windows.

[Q] How do I create an HTML dialog box?

Web Editor Control 6 provides an HTML dialog box function enabling users to create frequently used dialog boxes with his or her tastes. After creating the html source for a dialog box, specify the directory saved in the path that the user can access the Initialization file of the control. The control value of the dialog box is sent with JScript or VBScript.

  • window.dialogArguments (read only)
    - Brings the value that is sent to the HTML dialog box from the Control
  • window.retunValue
    -Returns the value from the HTML dialog box to the Control

Web Editor Control 6 represents each value split by \; (back-slash and semicolon): therefore, the separator should not be used for the attributes (example: 200px\;76%\;). To know the attributes used in the example, refer to MSDN.

The following is a list of applicable dialog boxes.

Open File dialog box

  • File name: fileopen.htm
  • dialogArguments
    • FileType, File Path
  • returnValue
    • File Name, File Type, File Path
  • File Name: File name (in Full Path)
  • File Type: File type
  • File Path: File path
     

Save File dialog box

  • File name: filesave.htm
  • dialogArguments
    • Default Name, File Type, File Path
  • returnValue
    • File Name, File Type, File Path
  • Default Name: Default file name to save a file
  • File Name: File name (in Full Path)
  • File Type: File type
  • File Path: File path
  • Note
    • Once a document was saved, the document information is saved in Default Name, File Type, and File Path of dialogArguments. Default Name is the file name without its path. On the other hand, File Name is the file name including its path.
       

Image Properties dialog box

  • File name: imageproperty.htm
  • dialogArguments
    • image path, alt text, width, width unit, height, height unit, alignment, horizontal margin, vertical margin, border thickness
  • returnValue
    • image path, alt text, width, width unit, height, height unit, alignment, horizontal margin, vertical margin, border thickness
  • image path: Image file path
  • alt text: Short comment that describes the image
  • width: Width of the image (Specified as a default size when width is not set)
  • width unit: Width unit of the image (0 : pixel, 1: %)
  • height: Height of the image (Specified as a default size when height is not set)
  • height unit: Height unit of the image (same as width unit)
  • alignment: Alignment of the image
    • -1: default , 0: top, 1: middle, 2: baseline, 3: bottom, 4: left, 5: right, 6: absolute middle, 7: absolute bottom
  • horizontal margin: Horizontal margin
  • vertical margin: Vertical margin
  • border thickness: Border thickness
     

Table Properties dialog box

  • File name: tableproperty.htm
  • dialogArguments
    • rows, columns, width, width unit, height, height unit, alignment, cell padding, cell spacing, border thickness, border color, light border, dark border, bg color, bg image, edit flag
  • returnValue
    • rows, columns, width, width unit, height, height unit, alignment, cell padding, cell spacing, border thickness, border color, light border, dark border, bg color, bg image, edit flag
  • rows: numbers of rows
  • columns: numbers of columns
  • width: Width of the table
  • height: Height of the table
  • width unit, height unit: Unit of width and height
    • Pixel (0), Percent (1)
  • alignment: Alignment
    • Default (0), Left (1), Right (2), Center (3), Justify (4), Float Left (5), Float Right (6)
  • cell padding: Cell padding
  • cell spacing: Cell spacing
  • border thickness: Border thickness
  • border color: Border color
  • light border: Light border
  • dark border: Dar border
  • bg color: Background color
  • bg image: Background image
     

Cell Properties dialog box

  • File name: cellproperty.htm
  • dialogArguments
    • width specified, width, width unit, height specified, height, height unit, horizontal alignment, vertical alignment, no wrap, heading, bg color specified, bg color, bg image specified, bg image, border color specified, border color, light border color specified, light border, dark color specified, dark border
  • returnValue
    • width specified, width, width unit, height specified, height, height unit, horizontal alignment, vertical alignment, no wrap, heading, bg color specified, bg color, bg image specified, bg image, border color specified, border color, light border color specified, light border, dark color specified, dark border
  • width specified: Is the  width of the cell specified?
    • No (0), Yes (1), Not clear (2)
  • width: Width of the cell
  • height specified: Is the  height of the cell specified?
    • No (0), Yes (1), Not clear (2)
  • height: Height of the cell
  • width unit,height unit: Unit of width and height
    • Pixel (0), Percent (1)
  • horizontal alignment: Horizontal alignment (same values as the ones of table alignment)
  • vertical alignment: Vertical alignment
    • None (0), Top (1), Middle (2), Bottom (3), Baseline (4)
  • no wrap: No wrap
  • heading: Heading cell
  • bg color specified, bg image specified, border color specified, light border color specified, dark color specified: Decides whether to specify each background color, background image, border color, light border color, and dark border color
    • Not specified (0), Specified (1), Not clear (2)
  • bg color: Background color
  • bg image: Background image
  • border color: Border color
  • light border color: Light border color
  • dark border color: Dark border color
     

Character Style dialog box

  • File name: characterstyle.htm
  • dialogArguments
    • font specified, font, font color specified, font color, bg color specified, bg color, font size specified, font size, css font size specified, css font size, css font size unit, Bold, Italic, Underline, Strikethrough, Typewriter, script
  • returnValue
    • font specified, font, font color specified, font color, bg color specified, bg color, font size specified, font size, css font size specified, css font size, css font size unit, Bold, Italic, Underline, Strikethrough, Typewriter, script
  • font specified: Decides whether to specify font
    • Not specified (0), Specified (1), Not clear (2)
  • font: Font
  • font color specified: Decides whether to specify the font color
    • Not specified (0), Specified (1), Not clear (2)
  • font color: Font color
  • bg color specified: Decides whether to specify font background color
    • Not specified (0), Specified (1), Not clear (2)
  • bg color: Font background color
  • font size specified: Decides whether to specify the font size
    • Not specified (0), Specified (1), Not clear (2)
  • font size: Font size (HTML font size. The number 1~7 is used)
  • css font size specified: Decides whether to specify CSS font size
    • Not specified (0), Specified (1), Not clear (2)
  • css font size: CSS font size (All numbers are used)
  • css font size unit: CSS font size unit (Pixel, point, etc is used)
    • Pixel (px), Point (pt). Example: 10\;pt\; (10 point)
  • Bold: Bold (1), normal (0)
  • Italic: Italic (1), normal (0)
  • Underline: Underline (1), normal (0)
  • Strikethrough: Strikethrough (1), normal (0)
  • Typewriter: Typewriter (1), normal (0)
  • Script: normal (0), superscript (1), subscript (2)
     

Document properties dialog box

  • File name: documentproperty.htm
  • dialogArguments
    • Baselocation, title, Author, Classification, Description, Keywords, charset, bgcolor, text color, hyperlink color, visited color, active color, bg image
  • returnValue
    • Baselocation, title, Author, Classification, Description, Keywords, charset, bgcolor, text color, hyperlink color, visited color, active color, bg image
  • Baselocation: Base location
  • Title: Document title
  • Author: Author
  • Classification: Classification
  • Description: Description
  • Keywords: Keywords
  • Charset: The encoding character set of the document. To specify its value select one of the followings, which are case-sensitive. A particular char-set cannot be used in some computers depending on the languages that they support. To check char-set that your computer support, see the Registry HKEY_CLASSES_ROOT\MIME\Database\Charset.
    • uft-8, euc-kr, ks_c_5601-1987, shift_jis, euc-jp, iso-2022-jp, gb2312, big5, ebcdic-cp-us, CP500, x-EBCDIC-Japan, IBM437, us-ascii, windows-1253, iso-8859-15, windows-1257, windows-1258, ibm850, macitosh, windows-1256, ibm861, x-mac-icelandic, iso-8859-1, windows-1252, x-user-defined, utf-7, x-mac-japanease, EUC-CN, hz-gb-2312, x-mac-chineasei, x-chinease-CNS, x-mac-chineasestr, iso-8859-2, windows-1250, koi8-r, windows-1251, windows-874, windows-1254, iso-2022-kr, x-mac-korean, Johab, windows-1255
  • bgcolor: Background color of the document
  • text color: Text color
  • hyperlink color: Hyperlink color
  • visited color: Visited hyperlink color
  • active color: Active hyperlink color
  • bg image: Background image