wproEditor
Availability: All versions
Type: JavaScript object.
Description: A wproEditor object represents an editor and contains all the properties and methods for interacting with an editor.
Throughout this manual we refer to a wproEditor object simply as an editor object.
Before you can interact with an editor using JavaScript you need to know how to access the editor object. To do this you must know the name of the editor you wish to access. When constructing the editor in PHP you should have given the editor a name using the name property.
There are several ways to access an editor object:
In each example editorName represents the name of the editor you wish to access.
Using the WPro.editors collection:
WPro.editors['editorName']
Or if you don't know the name of an editor you can use a numeric index
where 0 represents the first editor on the page, 1 the second, 2 the
third and so on:
WPro.editors[0]
If there are several editors on the page you can access the currently active editor using:
WPro.currentEditor
Using the form element:
For this to work the editor must be displayed within a form
document.formName.elements['editorName'].editor
The old method from version 2.x where each editor object was accessed through a global variable should no longer be used.
From within a dialog plugin the current editor is available using the following:
DIALOG.currentEditor
The WPro object is also available from within a dialog plugin.
Properties and methods:
Contents
This online documentation specifically covers version 3.0 and above, developers using earlier versions should refer to their PDF or MS-Word manual that was included in the product download.
