The XHTML WYSIWYG Editor For Desktop & Web Applications

XStandard upgrade guide

Upgade to version 3.0

API changes

  • The following API have been added:
    • CallProperties()
    • ClearCache()
    • GetAttributes()
    • RemoveAttribute()
    • SetAttribute()
    • DialogPropertiesActivated()
    • SetDialogProperties()
    • Paste()
    • SetPaste()

Customization files

The following customization files have changed:

  • buttons.xml
  • icons.xml
  • preview.xsl
  • screenreader.xsl
  • localization.xml

Please note that the editor ships with the default version of these customization files already built-in. Reference external customization files only if you have modified them.

XStandard in desktop applications

Because of API changes, some development environments will require that references to the editor be removed from the project and then added back in. Visual Studio developers can follow these steps:

1. Install XStandard.

2. In Visual Studio, in the Solution Explorer window, under References:

  • Right-click AxXStandard, and then click Remove.
  • Right-click XStandard, and then click Remove.

3. From the following folders, if present, delete files AxInterop.XStandard.dll, Interop.XStandard.dll and XStandard.dll:

  • <YourProject>\bin\Debug
  • <YourProject>\bin\Release
  • <YourProject>\obj\Debug
  • <YourProject>\obj\Release

4. Open Visual Studio command prompt. Change directory to the location of XStandard.ocx. Usually this will be "C:\Program Files\XStandard\Bin". Type following:

  1. aximp XStandard.ocx /out:AxInterop.XStandard.dll

Files AxInterop.XStandard.dll and XStandard.dll will be created in the same folder as XStandard.ocx. Copy these files and paste them into the following folders:

  • <YourProject>\bin\Debug
  • <YourProject>\bin\Release
  • <YourProject>\obj\Debug
  • <YourProject>\obj\Release

You may delete AxInterop.XStandard.dll and XStandard.dll from "C:\Program Files\XStandard\Bin".

5. In Visual Studio, in the Solution Explorer window, right-click over References and select "Add Reference". Click on the Browse tab and select AxInterop.XStandard.dll and XStandard.dll from the folder:

  • <YourProject>\bin\Release

6. On the Build menu, click Build Solution.

XStandard in Web applications

The best way to install/upgrade XStandard is through EXE for Windows or DMG for OS X.

IE supports auto-install and auto-upgrade. See Web Integration FAQs for details. Version 3.0.0.0 CAB file for IE is available from:

http://xstandard.com/download/XStandard.cab

For ASP.NET developers, there are no changes to XStandard.WebForms.dll control.

Web services

There are no changes to Web services.

Using version 2 and 3 in the same CMS

Instructions on how to use version 2 and 3 in the same CMS.

Upgade to version 2.0

API changes

  • ModeChange() event has been renamed to ModeChanged()
  • ButtonClick() event has been renamed to ButtonClicked()
  • The following API have been removed:
    • Proxy
    • EnableProxy
    • EnableProxyAuthentication
    • Toolbar
    • Expand
  • The following API have been added:
    • ProxySetting
    • ProxyServer
    • ContextMenuActivated()
    • ContextMenuClicked()
    • ClearContextMenu()
    • ToolbarWysiwyg
    • ToolbarSource
    • ToolbarPreview
    • ToolbarScreenReader
    • ExpandToolbarWysiwyg
    • ExpandToolbarSource
    • ExpandToolbarPreview
    • ExpandToolbarScreenReader
    • ToolbarEffect

The behavior of Debug has changed. When set to yes, the editor will write to a log file all HTTP communication. This log file can be accessed from the Debug tab in the About dialog box. Do not enable this setting unless you need to debug HTTP communication.

Hooking into JavaScript events

The following code shows how to hook into JavaScript events.

  1. <script type="text/javascript">
  2. //<![CDATA[
  3. function xsButtonClicked(id, button, state) {
  4. alert('Editor: ' + id + '; function: xsButtonClicked(); button: ' + button);
  5. }
  6. function xsContentChanged(id) {
  7. alert('Editor: ' + id + '; function: xsContentChanged()');
  8. }
  9. function xsModeChanged(id) {
  10. alert('Editor: ' + id + '; function: xsModeChanged()');
  11. }
  12. function xsContextMenuActivated(id) {
  13. alert('Editor: ' + id + '; function: xsContextMenuActivated()');
  14. document.getElementById(id).ClearContextMenu();
  15. document.getElementById(id).AddToContextMenu('a', 'My item a', '');
  16. document.getElementById(id).AddToContextMenu('b', 'My item b', '');
  17. document.getElementById(id).AddToContextMenu('c', 'My item c', '');
  18. document.getElementById(id).AddToContextMenu('d', 'My item d', '');
  19. document.getElementById(id).AddToContextMenu('e', 'My item e', '');
  20. }
  21. function xsContextMenuClicked(id, menu) {
  22. alert('Editor: ' + id + '; function: xsContextMenuClicked(); menu: ' + menu);
  23. }
  24. //]]>
  25. </script>

Customization files

The following customization files have changed:

  • buttons.xml
  • icons.xml
  • preview.xsl
  • screenreader.xsl
  • localization.xml

Please note that the editor ships with the default version of these customization files already built-in. Reference external customization files only if you have modified them.

In buttons.xml, the "indent" button is now used for inserting a tab character in View Source. If you need the previous functionality of this button, you can define a new button in buttons.xml file with a different ID. For example:

  1. <style>
  2. <id>p-indent</id>
  3. <label>Indent paragraph</label>
  4. <elt>p</elt>
  5. <attr>
  6. <name>class</name>
  7. <value>indent</value>
  8. </attr>
  9. <icon>indent</icon>
  10. </style>

In buttons.xml, the "validate" button was previously a generic button used to generate an event. In version 2 it is a predefined button used in View Source mode.

In buttons.xml, button ID "line" has been renamed to "separator".

XStandard in desktop applications

Because of API changes, some development environments will require that references to the editor be removed from the project and then added back in. Visual Studio developers can follow these steps:

1. Install XStandard.

2. In Visual Studio, in the Solution Explorer window, under References:

  • Right-click AxXStandard, and then click Remove.
  • Right-click XStandard, and then click Remove.

3. From the following folders, if present, delete files AxInterop.XStandard.dll, Interop.XStandard.dll and XStandard.dll:

  • <YourProject>\bin\Debug
  • <YourProject>\bin\Release
  • <YourProject>\obj\Debug
  • <YourProject>\obj\Release

4. Open Visual Studio command prompt. Change directory to the location of XStandard.ocx. Usually this will be "C:\Program Files\XStandard\Bin". Type following:

  1. aximp XStandard.ocx /out:AxInterop.XStandard.dll

Files AxInterop.XStandard.dll and XStandard.dll will be created in the same folder as XStandard.ocx. Copy these files and paste them into the following folders:

  • <YourProject>\bin\Debug
  • <YourProject>\bin\Release
  • <YourProject>\obj\Debug
  • <YourProject>\obj\Release

You may delete AxInterop.XStandard.dll and XStandard.dll from "C:\Program Files\XStandard\Bin".

5. In Visual Studio, in the Solution Explorer window, right-click over References and select "Add Reference". Click on the Browse tab and select AxInterop.XStandard.dll and XStandard.dll from the folder:

  • <YourProject>\bin\Release

6. On the Build menu, click Build Solution.

Also, XStandard is no longer dependent on MSXML 4. This library does not need to be distributed as part of XStandard install.

XStandard in Web applications

The best way to install/upgrade XStandard is through EXE for Windows or DMG for OS X.

Some Web browsers support auto-install and auto-upgrade. See Web Integration FAQs for details. Microsoft IE 7 has a bug with auto-install, please see Knowledge Base for a workaround. Version 2.0.0.0 CAB file for IE is available from:

http://xstandard.com/download/2-0-0-0/XStandard.cab

ASP.NET developers can download the new XStandard.WebForms.dll from ASP.NET example. Please note, this DLL is now offered in ASP.NET 1.1 and 2.0.

Web services

It is recommended that you upgrade to the latest version of Web services. Download them from:

The new Web services are compatible with XStandard version 1.7.1.

Installer changes

On Windows, XStandard version 2 will be installed in "C:\Program Files\XStandard". The version 2 installer will remove any previous version of the editor installed in "C:\XStandard".