API Reference
XStandard is added to a Web page using an <object>
tag. Inside the <object>
tag, the type
attribute is used to identify the type of plug-in to display, while <param>
tags are used to customize the editor's functionality. For example:
<object type="application/x-xstandard" id="editor1" width="100%" height="400">
<param name="Value" value="Hello World!" />
</object>
Below is a list of properties (<param>
tag names), methods, events and their descriptions.
Basic Settings
Property Value
XHTML data that the user (business author) has entered.
Property CSS
Absolute URL or file path to a CSS file or CSS data. If absent, a built-in CSS file will be used. This file contains CSS formatting rules and can be the same CSS file used on your Web site.
Property Styles
Absolute URL or file path to an XML styles file or XML data as a string. If absent, a built-in styles file will be used. This file is used to populate the drop-down Styles Menu. Each style contains instructions for generating markup.
Property Base
URL used to resolve relative URLs for images defined in markup.
Property License
Absolute URL or file path to a license file or license data as a string. If absent, the editor will run under the XStandard Lite freeware license.
Web Services Settings
Property SpellCheckerURL
(Available in XStandard Pro)
Absolute URL to a Spell Web Service. For testing purposes, the following URL is available: http://soap.xstandard.com/spellchecker.aspx
Property SpellCheckerLangFilter
(Available in XStandard Pro)
A comma-delimited list of dictionaries that are a sub-set of the dictionaries available for the Spell Web Service. In other words, if the Web Service supports 10 dictionaries but you want XStandard to use only 2, you would specify the two dictionaries in this parameter. For example: en-ca, fr
Property SpellCheckerLang
(Available in XStandard Pro)
A language code to indicate a default dictionary language for spell checking. The default dictionary must be defined in the spellchecker.config file for the SpellChecker Web Service. Example: en-us
Property DirectoryURL
(Available in XStandard Pro)
Absolute URL to a Directory Web Service. Multiple URLs can be specified, separated by a space character. For testing purposes, the following URL is available: http://soap.xstandard.com/directory.aspx
Property ImageLibraryURL
(Available in XStandard Pro)
Absolute URL to an Image Library Web Service. Multiple URLs can be specified, separated by a space character. For testing purposes, the following URL is available: http://soap.xstandard.com/imagelibrary.aspx
Property AttachmentLibraryURL
(Available in XStandard Pro)
Absolute URL to an Attachment Library Web Service. Multiple URLs can be specified, separated by a space character. For testing purposes, the following URL is available:
http://soap.xstandard.com/attachmentlibrary.aspx
Property LinkLibraryURL
(Available in XStandard Pro)
Absolute URL to a Link Library Web Service. Multiple URLs can be specified, separated by a space character. For testing purposes, the following URL is available:
http://soap.xstandard.com/linklibrary.aspx
Property SubdocumentURL
(Available in XStandard Pro)
Absolute URL to a Subdocument Web Service. For testing purposes, the following URL is available:
http://soap.xstandard.com/subdocument.aspx
Customization Settings
These settings are used to configure the localization, functionality and look & feel of the editor.
Property Lang
A two-letter language code (should be lowercase) that is used for localization. XStandard ships with 19 localizations - en
(English), de
(German), fr
(French), nl
(Dutch), es
(Spanish), it
(Italian), cn
(Simplified Chinese), id
(Indonesian), jw
(Javanese), el
(Greek), ru
(Russian), uk
(Ukrainian), he
(Hebrew), sr
(Serbian), sh
(Serbo-Croatian), cs
(Czech), da
(Danish), fi
(Finnish) and sv
(Swedish). The default value is en
. See the Localization section of this document for how to create your own localizations.
Property Dir
Sets the default text direction for the editor. Possible values are: ltr
and rtl
.
Property EditorCSS
Absolute URL or file path to a CSS file or CSS data. This file contains CSS rules that are only used by the editor in WYSIWYG mode. This property is useful for locking and markers. The CSS rules can be set at run-time like this:
XHTMLEditor1.EditorCSS = "h1 {-xs-lock: yes; color:red}";
Property EnablePasteMarkup
(Available in XStandard Pro)
If set to yes
(or True
), the editor will attempt to retain structural elements (lists, tables, hyperlinks, images, headings, etc.) when pasting from Microsoft Word or from Web pages. Semantically meaningless markup such as <font>
will be stripped out. The default value is no
(or False
).
Property EnableTimestamp
(Available in XStandard Pro)
This setting is used to enable or disable the timestamp comment added to markup generated by the editor. The default value is yes
. The timestamp looks like:
<!-- Generated by XStandard version 2.0.0.0 on 2007-06-15T14:16:20.967 -->
Property Localization
Absolute URL or file path to localization.xml file or XML data as a string. If absent, US English localization will be used.
Property PreviewXSLT
Absolute URL or file path to preview.xsl file or XSLT data as a string. If absent, a built-in preview file will be used. This file is used to render the Browser Preview feature.
Property ScreenReaderXSLT
Absolute URL or file path to screenreader.xsl file or XSLT data as a string. If absent, a built-in screen reader preview file will be used. This file is used to render the Screen Reader Preview feature.
Property Buttons
(Available in XStandard Pro)
Absolute URL or file path to buttons.xml file or XML data as a string. If absent, a built-in buttons file will be used. This file is used to change icons and define buttons for the toolbar. The property ToolbarWysiwyg
is used to specify which of the buttons defined in this file will appear on the toolbar.
Property Icons
(Available in XStandard Pro)
Absolute URL or file path to icons.xml file or XML data as a string. If absent, a built-in icons file will be used. This file is used to change icons used in the editor.
Property Placeholders
(Available in XStandard Pro)
Absolute URL or file path to placeholders.xml file or XML data as a string. If absent, a built-in placeholders file will be used. This file is used to change the icons used for placeholders (custom tags). See the Placeholders section of this document for more details.
Property BackgroundColor
This is a Web-named color or a HEX color value for the background of solid areas in the editor, such as the toolbar. For example: yellow or #ffff00. This feature is not available for Mozilla/Firefox on Windows XP. Note that the background color used in the actual authoring area of the editor is controlled by CSS.
Property BorderColor
This is a Web-named color or a HEX color value for the editor's border.
Property ToolbarWysiwyg
This parameter customizes the toolbar in WYSIWYG mode. This parameter accepts a comma-delimited list of button IDs. Buttons IDs are defined in buttons.xml file. A list of default buttons IDs is available in the Interface section of this documentation. Consecutive commas generate a delimeter (vertical bar) between buttons. For example:
- ordered-list, unordered-list, definition-list,, draw-layout-table, draw-data-table, image, separator, hyperlink, attachment, directory, spellchecker,, wysiwyg, source, preview, screen-reader, help
To force the toolbar to wrap, use ;
at the wrapping point.
Property ToolbarSource
This parameter customizes the toolbar in View Source mode. This parameter accepts a comma-delimited list of button IDs. Buttons IDs are defined in buttons.xml file. A list of default buttons IDs is available in the Interface section of this documentation. Consecutive commas generate a delimeter (vertical bar) between buttons. For example:
- indent, whitespace, word-wrap, dim-tags, validate,, wysiwyg, source, preview, screen-reader
Property ToolbarPreview
This parameter customizes the toolbar in Preview mode. This parameter accepts a comma-delimited list of button IDs. Buttons IDs are defined in buttons.xml file. A list of default buttons IDs is available in the Interface section of this documentation. Consecutive commas generate a delimeter (vertical bar) between buttons. For example:
- wysiwyg, source, preview, screen-reader
Property ToolbarScreenReader
This parameter customizes the toolbar in Screen Reader Preview mode. This parameter accepts a comma-delimited list of button IDs. Buttons IDs are defined in buttons.xml file. A list of default buttons IDs is available in the Interface section of this documentation. Consecutive commas generate a delimeter (vertical bar) between buttons. For example:
- wysiwyg, source, preview, screen-reader
Property ToolbarEffect
This parameter is used to give a decorative effect to the background of the toolbar. Currently on value of "linear-gradient" is supported.
Property ShowStyles
(Available in XStandard Pro)
This parameter can be used to hide the drop-down Styles Menu found on the toolbar. Possible values are: yes
and no
.
Property ShowToolbar
(Available in XStandard Pro)
This parameter can be used to hide toolbar buttons. Possible values are: yes
and no
.
Property ExpandWidth
(Available on Windows)
This parameter sets the width in pixels or as percent of screen width for the editor's expanded window.
Property ExpandHeight
(Available on Windows)
This parameter sets the height in pixels or as percent of screen height for the editor's expanded window.
Property ExpandToolbarWysiwyg
(Available on Windows)
This parameter customizes the toolbar in the editor's expanded window in WYSIWYG mode. See ToolbarWysiwyg
parameter for setting values.
Property ExpandToolbarSource
(Available on Windows)
This parameter customizes the toolbar in the editor's expanded window in View Source mode. See ToolbarSource
parameter for setting values.
Property ExpandToolbarPreview
(Available on Windows)
This parameter customizes the toolbar in the editor's expanded window in Preview mode. See ToolbarPreview
parameter for setting values.
Property ExpandToolbarScreenReader
(Available on Windows)
This parameter customizes the toolbar in the editor's expanded window in Screen Reader Preview mode. See ToolbarScreenReader
parameter for setting values.
Property ExpandShowStyles
(Available in XStandard Pro on Windows)
This parameter can be used to hide the drop-down Styles Menu found on the toolbar in the editor's expanded window. Possible values are: yes
and no
.
Property ExpandShowToolbar
(Available in XStandard Pro on Windows)
This parameter can be used to hide toolbar buttons in the editor's expanded window. Possible values are: yes
and no
.
Property CustomInlineElements
A comma delimited list of custom elements the editor will treat as inline elements. For example: price, stock, temperature. Custom inline elements are teated like a <span>
. Inline elements cannot contain block elements. Inline elements must be contained within a block element. For example:
<p>Today's temperature is <temperature />.</p>
Property CustomBlockElements
A comma delimited list of custom elements the editor will treat as block elements. For example: include, rss. Custom block elements are treated like a <div>
and therefore cannot be contained by <p>
. For example:
<p>Some text</p>
<include doc="123" />
<p>Some more text</p>
Property CustomEmptyElements
A comma delimited list of custom elements the editor will treat as empty elements. For example: include. Empty elements cannot contain content and are written like this: <include doc="123" />.
Property Rel
A space delimited list of values used to populate the "Relationship" field in the Hyperlink properties dialog box. If this property contains data, it will display in the simplified interface (when Options
512 is set). Please note, this functionality will continue to be supported in future releases but the implementation (API) may change.
Property Rev
A space delimited list of values used to populate the "Reverse relationship" field in the Hyperlink properties dialog box. If this property contains data, it will display in the simplified interface (when Options
512 is set). Please note, this functionality will continue to be supported in future releases but the implementation (API) may change.
Property Options
Used to enable/disable features in the editor. This value is a bitmask (a sum of values associated with different features). The following table describes each setting.
Value | Description |
---|
1 | Display hard returns. |
2 | Automatically fix errors when "dirty" code is loaded into the editor. |
4 | Hide most items from the context menus (pop-up menus when the right mouse button is clicked). |
8 | Wrap text in View Source. |
16 | Hide line numbers in View Source. |
32 | Disable object resizing by dragging (using image "handles" for example). |
64 | Treat uploading images as decorative. |
128 | Do not switch to Images As Text mode during find/replace or spell checking. |
256 | Convert extra spaces into hard-spaces. |
512 | Hide advanced editing features (Advanced and Custom tabs as well as certain fields in Properties dialog boxes). |
1024 | Use SOAP 1.2 |
2048 | Treat <div> as as structure element. By default, <div> is used as a grouping element. |
4096 | Disable Directory button when content is selected. |
8192 | Disable "Fix" option when invalid markup is entered into View Source and user switches to WYSIWYG view. |
16384 | Automatically remove undefined custom elements. To define custom elements, use CustomInlineElements and CustomBlockElements properties. |
32768 | Paste images as alternate text when file upload is unavailable/disabled. |
65536 | Strict mode when pasting from applications like Word. Removes attributes like id , align and valign . |
131072 | Display the "Class" field on the General tab of the Properties dialog box in the simplified interface (when Options 512 is set). The only exception to this is in the Image properties dialog box when there is a value in ClassImageFloatLeft / ClassImageFloatRight properties. |
262144 | Display the "ID" field on the General tab of the Properties dialog box in the simplified interface (when Options 512 is set). |
For example, a value of 24 (8 + 16) would both wrap text and hide line numbers in View Source.
Authoring Techniques Settings
Property ClassImageFloatLeft
A CSS class name used to align images to the left.
Property ClassImageFloatRight
A CSS class name used to align images to the right.
Property ScriptNewWindow
JavaScript used to open a new window. Default value is:
window.open(this.href);return false;
Integration Settings
These settings are useful when integrating the editor into content management solutions.
Property EscapeUnicode
If set to yes
(or True
), characters outside the ANSI limits will be escaped into a numeric representation. For example, мир. This feature is useful when you need to work in a truly multilingual environment but some of the components of your content management system do not yet support Unicode.
Property DocumentID
Used for integration with CM systems, the value of this property will be transmitted in all HTTP requests made by the editor in a header named: X-Document-ID
. From ASP, read this value as: Request.ServerVariables("HTTP_X_DOCUMENT_ID").Item
. From PHP, read this value as: $_SERVER["HTTP_X_DOCUMENT_ID"]
.
Property UserID
Used for integration with CM systems, the value of this property will be transmitted in all HTTP requests made by the editor in a header named: X-User-ID.
From ASP, read this value as: Request.ServerVariables("HTTP_X_USER_ID").Item
. From PHP, read this value as: $_SERVER["HTTP_X_USER_ID"]
.
Property SessionID
Used for integration with CM systems, the value of this property will be transmitted in all HTTP requests made by the editor in a header named: X-Session-ID
. From ASP, read this value as: Request.ServerVariables("HTTP_X_SESSION_ID").Item
. From PHP, read this value as: $_SERVER["HTTP_X_SESSION_ID"]
.
Property TransactionID
Used for integration with CM systems, the value of this property will be transmitted in all HTTP requests made by the editor in a header named: X-Transaction-ID
. From ASP, read this value as: Request.ServerVariables("HTTP_X_TRANSACTION_ID").Item
. From PHP, read this value as: $_SERVER["HTTP_X_TRANSACTION_ID"]
.
Property ClientID
Used for integration with CM systems, the value of this property will be transmitted in all HTTP requests made by the editor in a header named: X-Client-ID
. From ASP, read this value as: Request.ServerVariables("HTTP_X_CLIENT_ID").Item
. From PHP, read this value as: $_SERVER["HTTP_X_CLIENT_ID"]
.
Property InstanceID
Used for integration with CM systems, the value of this property will be transmitted in all HTTP requests made by the editor in a header named: X-Instance-ID
. From ASP, read this value as: Request.ServerVariables("HTTP_X_INSTANCE_ID").Item
. From PHP, read this value as: $_SERVER["HTTP_X_INSTANCE_ID"]
.
Property TagID
Used for integration with CM systems, the value of this property will be transmitted in all HTTP requests made by the editor in a header named: X-Tag-ID
. From ASP, read this value as: Request.ServerVariables("HTTP_X_TAG_ID").Item
. From PHP, read this value as: $_SERVER["HTTP_X_TAG_ID"]
.
Property ZoneID
Used for integration with CM systems, the value of this property will be transmitted in all HTTP requests made by the editor in a header named: X-Zone-ID
. From ASP, read this value as: Request.ServerVariables("HTTP_X_ZONE_ID").Item
. From PHP, read this value as: $_SERVER["HTTP_X_ZONE_ID"]
.
Property ProjectID
Used for integration with CM systems, the value of this property will be transmitted in all HTTP requests made by the editor in a header named: X-Project-ID
. From ASP, read this value as: Request.ServerVariables("HTTP_X_PROJECT_ID").Item
. From PHP, read this value as: $_SERVER["HTTP_X_PROJECT_ID"]
.
Property AreaID
Used for integration with CM systems, the value of this property will be transmitted in all HTTP requests made by the editor in a header named: X-Area-ID
. From ASP, read this value as: Request.ServerVariables("HTTP_X_AREA_ID").Item
. From PHP, read this value as: $_SERVER["HTTP_X_AREA_ID"]
.
Property GroupID
Used for integration with CM systems, the value of this property will be transmitted in all HTTP requests made by the editor in a header named: X-Group-ID
. From ASP, read this value as: Request.ServerVariables("HTTP_X_GROUP_ID").Item
. From PHP, read this value as: $_SERVER["HTTP_X_GROUP_ID"]
.
Property ParentID
Used for integration with CM systems, the value of this property will be transmitted in all HTTP requests made by the editor in a header named: X-Parent-ID
. From ASP, read this value as: Request.ServerVariables("HTTP_X_PARENT_ID").Item
. From PHP, read this value as: $_SERVER["HTTP_X_PARENT_ID"]
.
Property ContainerID
Used for integration with CM systems, the value of this property will be transmitted in all HTTP requests made by the editor in a header named: X-Container-ID
. From ASP, read this value as: Request.ServerVariables("HTTP_X_CONTAINER_ID").Item
. From PHP, read this value as: $_SERVER["HTTP_X_CONTAINER_ID"]
.
Property ObjectID
Used for integration with CM systems, the value of this property will be transmitted in all HTTP requests made by the editor in a header named: X-Object-ID
. From ASP, read this value as: Request.ServerVariables("HTTP_X_OBJECT_ID").Item
. From PHP, read this value as: $_SERVER["HTTP_X_OBJECT_ID"]
.
Property Cookie
This value is used to maintain a cookie-based session state between the editor and Web Services. Web Services have to be configured to use session state and the value for this property is typically set as follows:
ASP example: <param name="Cookie" value="<%=Server.HTMLEncode(Request.ServerVariables("HTTP_COOKIE").Item) %>" />
PHP example: <param name="Cookie" value="<?php echo htmlspecialchars($_SERVER["HTTP_COOKIE"], ENT_COMPAT) ?>" />
Property EnableCache
Caches the editor's customization files when downloaded over a network. See the Caching section in this document for more information on configuring this feature.
Property HeartbeatURL
(Available in XStandard Pro)
Absolute URL to where "Heartbeat" pulses are sent. See the Heartbeat section of this document for more information on configuring this feature.
Property HeartbeatInterval
(Available in XStandard Pro)
Number of seconds between Heartbeat pulses. The default value and minimum value is 60
.
Property Namespaces
Namespaces declaration. For example:
<param name="Namespaces" value="xmlns:a='http://apple-books' xmlns:b='http://big-books'" />
See the Namespaces section of this document for more information on configuring this feature.
Hooks & Extensions Settings
These settings are used to extend the functionality of the editor through custom code.
Property Mode
(Available in XStandard Pro)
This property can be used to set the default view of the editor, or to programmatically switch between views. Possible values are: wysiwyg or source or preview or screen-reader. The default value is wysiwyg.
Event ModeChanged(sFrom, sTo)
(Available in XStandard Pro in non-browser applications.)
Fires when Mode
changes. To capture this event in Web-based applications, use the following code:
<script type="text/javascript">
//<![CDATA[
function xsModeChanged(id) {
alert('Editor: ' + id + '; function: xsModeChanged()');
}
//]]>
</script>
Event ContentChanged()
(Available in XStandard Pro)
Fires once when content is changed for the first time. To capture this event in Web-based applications, use the following code:
<script type="text/javascript">
//<![CDATA[
function xsContentChanged(id) {
alert('Editor: ' + id + '; function: xsContentChanged()');
}
//]]>
</script>
Event ButtonClicked(sButton, sState)
(Available in XStandard Pro)
Occurs when a button (of type <button>
in buttons.xml file) is pressed. Possible values for sState
are: on or off. To capture this event in Web-based applications, use the following code:
<script type="text/javascript">
//<![CDATA[
function xsButtonClicked(id, button, state) {
alert('Editor: ' + id + '; function: xsButtonClicked(); button: ' + button);
}
//]]>
</script>
Event ContextMenuActivated()
(Available in XStandard Pro)
Occurs when the context menu is activated. To capture this event in Web-based applications, use the following code:
<script type="text/javascript">
//<![CDATA[
function xsContextMenuActivated(id) {
alert('Editor: ' + id + '; function: xsContextMenuActivated()');
document.getElementById(id).ClearContextMenu();
document.getElementById(id).AddToContextMenu('a', 'My item a', '');
document.getElementById(id).AddToContextMenu('b', 'My item b', '');
document.getElementById(id).AddToContextMenu('c', 'My item c', '');
document.getElementById(id).AddToContextMenu('d', 'My item d', '');
document.getElementById(id).AddToContextMenu('e', 'My item e', '');
}
//]]>
</script>
Event ContextMenuClicked(sMenu)
(Available in XStandard Pro)
Occurs when a custom item in the context menu is clicked. To capture this event in Web-based applications, use the following code:
<script type="text/javascript">
//<![CDATA[
function xsContextMenuClicked(id, menu) {
alert('Editor: ' + id + '; function: xsContextMenuClicked(); menu: ' + menu);
}
//]]>
</script>
Sub AddToContextMenu(sID As String, sName As String, sGroup As String)
(Available in XStandard Pro)
Add custom item to the context menu.
sID
is the ID for the context menu item.
sName
is the label for the context menu item.
sGroup
is reserved for future use. This argument can be set to empty string.
Sub ClearContextMenu()
(Available in XStandard Pro)
Remove custom items from the context menu.
Sub CallToolbarButton(sID)
(Available in XStandard Pro)
Simulates a toolbar button click.
Sub ApplyStyleID(sID)
(Available in XStandard Pro)
Add or remove a style referenced by an ID. The style can be defined in the drop-down Styles Menu found on the toolbar.
Sub ApplyStyleXML(sStyle)
(Available in XStandard Pro)
Add or remove a style given the XML of the style.
Function CurrentStyles()
(Available in XStandard Pro)
A comma-delimited list of style IDs for the current cursor position. For example: 1,2,3,4,5. This list comes from the styles defined in the drop-down Styles Menu (not the toolbar). If /style/id
is missing from the style's XML definition, then this style will be omitted.
Property SelectedText
(Available in XStandard Pro)
Text of the current selection. If an empty element is selected (such as <img>
) or if nothing at all is selected, an empty string is returned.
Property SelectedXML
(Available in XStandard Pro)
Markup of the current selection. If nothing is selected, an empty string is returned.
Property TagList
(Available in XStandard Pro)
A comma-delimited list of parent tags (including the current tag) relative to the current cursor position. For example: body,p,strong
Property Path
(Available in XStandard Pro)
TagList as an XPath expression. For example: /body/p/strong
Property QPath
(Available in XStandard Pro)
TagList as a qualified XPath expression. For example: /body[1]/p[2]/strong[4]
Property TagListXML
(Available in XStandard Pro)
An XML document with a list of parent tags (including the current tag) relative to the current cursor position. For example:
<taglist>
<elt>
<name>body</name>
<index>1</index>
</elt>
<elt>
<name>p</name>
<index>2</index>
<attr>
<name>class</name>
<value>indent</value>
</attr>
</elt>
<elt>
<name>strong</name>
<index>4</index>
</elt>
</taglist>
Event TagListChanged()
(Available in XStandard Pro)
Occurs when the taglist changes for the current cursor position. To capture this event in Web-based applications, use the following code:
<script type="text/javascript">
//<![CDATA[
function xsTagListChanged(id) {
alert('Editor: ' + id + '; function: xsTagListChanged()');
}
//]]>
</script>
Sub InsertXML(sValue)
(Available in XStandard Pro)
Inserts markup at the current cursor position.
Sub InsertText(sValue)
(Available in XStandard Pro)
Inserts text at the current cursor position.
Sub SetAttribute(sQPath, sName, sValue)
(Available in XStandard Pro)
Inserts or updates an attribute for a given element identified by the qualified XPath expression.
Sub RemoveAttribute(sQPath, sName)
(Available in XStandard Pro)
Deletes an attribute for a given element identified by the qualified XPath expression.
Function Fix(sMarkup)
(Available in XStandard Pro)
This function takes "dirty" / legacy markup and attempts to clean it. Use this function when you need to clean HTML generated by other WYSIWYG editors, or when returning data from Internet Explorer's innerHTML
property.
Event FocusSet()
Occurs when the editor receives focus.
Event FocusLost()
Occurs when the editor loses focus.
Sub CallProperties(sQPath As String)
(Available in XStandard Pro)
Programmatically bring up the Properties dialog box for a given element. For example: .CallProperties("/body[1]/h2[1]")
Sub ClearCache()
Programmatically removes cached configuration files. This method is used in conjunction with EnableCache
property. It is equivalent to manually selecting Editor > Clear private data from the context menu.
Function GetAttributes(sQPath As String) As String
(Available in XStandard Pro)
Returns an XML
document containing the attributes for a given element. For example, .GetAttributes("/body[1]/p[1]/a[1]")
may return:
<attributes>
<attr>
<name>class</name>
<value>intro</value>
</attr>
<attr>
<name>href</name>
<value>/news/</value>
</attr>
</attributes>
Sub RemoveAttribute(sQPath As String, sName As String)
(Available in XStandard Pro)
Removes an attribute from a given element.
Sub SetAttribute(sQPath As String, sName As String, sValue As String)
(Available in XStandard Pro)
Adds/updates an attribute for a given element.
Event DialogPropertiesActivated(sQPath As String, sElement As String, sAttributes As String, sMetadata As String)
(Available in XStandard Pro)
Occurs when the Properties dialog box is requested. This event can be used to replace the editor's Properties dialog box with your own Properties dialog box. Below is a description of each argument:
sQPath
is a qualified XPath expression of the current element being edited. This value can be blank if the element has not been inserted into markup yet.
sElement
is the name of the element being inserted/edited.
sAttributes
is an XML document describing the attributes for this element. For example:
<attributes>
<attr>
<name>href</name>
<value>/files/report.doc</value>
</attr>
<attr>
<name>title</name>
<value>Year 2009 Annual Report</value>
</attr>
</attributes>
sMetadata
is reserved for future use.
To pass to the editor attributes from your own dialog box and to cancel the editor's dialog box, call SetDialogProperties()
during this event.
To capture this event in Web-based applications, use the following code:
<script type="text/javascript">
//<![CDATA[
function xsDialogPropertiesActivated(id, qpath, element, attributes, metadata) {
alert('Editor: ' + id + '; function: xsDialogPropertiesActivated()');
}
//]]>
</script>
Note, for Web-based applications, do not use floating divs as dialog boxes because they will render behind the editor in the browser's z-order.
Sub SetDialogProperties(sAttributes As String, bCancelDialog As Boolean, bCancelOperation As Boolean)
(Available in XStandard Pro)
Passes attribute values to the edtior or the Properties dialog box during DialogPropertiesActivated()
event. Below is a description of each argument:
sAttributes
is an XML document describing the attributes for this element. For example:
<attributes>
<attr>
<name>href</name>
<value>/files/report.doc</value>
</attr>
<attr>
<name>title</name>
<value>Year 2009 Annual Report</value>
</attr>
</attributes>
bCancelDialog
is a way for your code to disable the editor's Properties dialog box. If the value is True
, the editor will not display the Properties dialog box.
bCancelOperation
is a way for your code to cancel modifications to the markup. For example, if the user presses "Cancel" button in your dialog box, you should set this value to True
.
Event Paste(bMarkup, sData)
(Available in XStandard Pro)
This event fires when content is pasted into the editor. bMarkup
is a boolean value indicating if the content to be pasted is plain text or markup. sData
contains the content to be pasted. To modify the pasted content before it is inserted into the editor, call SetPaste()
method.
To capture this event in Web-based applications, use the following code:
<script type="text/javascript">
//<![CDATA[
function xsPaste(id, markup, data) {
alert('Editor: ' + id + '; function: xsPaste()');
}
//]]>
</script>
Sub SetPaste(bMarkup As Boolean, sData As String)
(Available in XStandard Pro)
This method modifies the pasted content during the Paste()
event.
Network Settings
Property ProxySetting
Specify if a proxy should be used. Possible values are:
auto-detect
(default value)- On Windows, the editor will use the connection settings specified for Internet Explorer.
direct
- Connect directly to the network. Do not use proxies.
manual
Use the proxy settings specified by the following properties:
- ProxyServer
- ProxyPort
- ProxyUser
- ProxyPassword
platform
- On Windows, this setting instructs the editor to use HTTP built into Internet Explorer. With this settting, the editor may be able to auto-login to your proxy server.
Property ProxyServer
Name or IP address of a proxy server.
Property ProxyPort
Port number of proxy server.
Property ProxyUser
User name used by proxy.
Property ProxyPassword
Password used by proxy.
Miscellaneous Settings
Property Version
(read-only)
The version of the editor currently in use. For example: 3.0.0.0
Property LatestVersion
This optional value is the latest available version of the editor. If this value is greater than the version of the editor installed, a message box informs the user that a newer version of the product is available. For example: 3.0.0.0
Property IndentOutput
If set to yes
(or True
), the output of the code will be indented. The default value is no
(or False
).
Property Debug
If set to yes
(or True
), to debug HTTP related issue. HTTP calls will be logged and can be seen on the Debug tab of the About dialog box. To open the About dialog box, from the context menu select "Editor > About". To avoid uncessary writes to the log file, generally keep this value set to no
(False).
Property Data
Same as the Value property. Use this property in Microsoft Access or other development environments where the Value
property is not available.