Availability: All versions. 

Type: PHP Class Object

Description: Class for creating and displaying wysiwygPro editors. It can be used to construct and display an editor but cannot manipulate an editor after it has been displayed. To manipulate an editor once it is running in the browser you will need to use the JavaScript API

File to include: wysiwygPro/wysiwygPro.class.php

Example usage (version 3.x): 

// include the file

// create a new editor instance:
$editor = new wysiwygPro();

// configure the editor:

// give the editor a name (equivalent to the name attribute on a regular textarea):
$editor->name = 'myeditor';

// set the content to be edited:
$editor->value = 'some HTML code'

// display the editor, the two parameters set the width and height:
$editor->display('100%', '400');


The editor should be displayed within an HTML form where you would normally have displayed a textarea. When the form is submitted you can retrieve the HTML code from the editor using the $_POST or $_GET super globals just like you would with a regular textarea or input. If you have not worked with form data in PHP before we suggest you read the PHP tutorial here: http://www.php.net/manual/en/tutorial.forms.php

Note: in most of the examples in this section much of the code above is omitted for clarity. Using the above example as a guide the examples in this section could be placed anywhere after $editor = new wysiwygPro(); and before $editor->display();

From within a dialog plugin the current editor object is available as a global variable named $EDITOR 

Properties and methods: