wysiwygPro
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):
<?php
// include the file
include_once("wysiwygPro/wysiwygPro.class.php");
// 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 = '<p>some HTML code</p>';
// display the editor, the two paramaters 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:
- Config file overrides
- Configuring the file managers
- addDirectory
- allowedDocExtensions
- allowedImageExtensions
- allowedMediaExtensions
- copyFiles
- copyFolders
- createFolders
- defaultImageView
- deleteFiles
- deleteFolders
- dirFilters
- documentDir
- documentURL
- editImages
- fileCHMOD
- folderCHMOD
- getDirectories
- imageDir
- imageURL
- maxDocSize
- maxImageDisplayHeight
- maxImageDisplayWidth
- maxImageHeight
- maxImageSize
- maxImageWidth
- maxMediaDisplayHeight
- maxMediaDisplayWidth
- maxMediaSize
- mediaDir
- mediaURL
- moveFiles
- moveFolders
- overwrite
- renameFiles
- renameFolders
- tempFilePrefix
- thumbnailFolderDisplayName
- thumbnailFolderName
- thumbnails
- upload
- Setting HTML content and format
- addCSSText
- addStylesheet
- baseURL
- doctype
- emptyValue
- encodeURLs
- escapeCharacters
- escapeCharactersMappings
- escapeCharactersRange
- fragmentCSSText
- fragmentStylesheet
- fullURLs
- guidelines
- htmlCharset
- htmlDirection
- htmlLang
- htmlVersion
- lineReturns
- loadValueFromFile
- loadValueFromURL
- newCellInners
- name
- urlFormat
- value
- jsBookmarkLinks
- Customization
- addButton
- addContextMenuItem
- addFont
- addRegisteredButton
- addSeparator
- addSize
- addSpacer
- addStyle
- addToolbar
- addJSButtonStateHandler
- addJSEditorEvent
- addJSFormattingHandler
- addJSFormattingValueHandler
- addJSHTMLFilter
- addJSPlugin
- appendToQueryStrings
- buttonIsEnabled
- clearContextMenu
- clearFontMenu
- clearSizeMenu
- clearStylesMenu
- colorSwatches
- clearToolbarLayout
- contextMenu
- disableBookmarkMngr
- disableFeature
- disableFeatures
- disableImgMngr
- disableLinkMngr
- disableThumbnails
- enableFeature
- enableFeatures
- featureIsEnabled
- features
- fontMenu
- JSPluginIsLoaded
- lang
- links
- linksBrowserURL
- loadPlugin
- loadPlugins
- pluginIsLoaded
- plugins
- registerAndEnableFeature
- registerButton
- registerFeature
- registerMenuButton
- registerSelect
- registerSeparator
- registerSpacer
- registerTextButton
- removeButtons
- removeContextMenuItem
- removeFont
- removeSize
- removeSnippet
- removeStyle
- removeToolbar
- route
- saveButton
- saveButtonHeight
- saveButtonLabel
- saveButtonURL
- saveButtonWidth
- sizeMenu
- snippets
- stylesMenu
- set_savebutton
- setButtonFunction
- toolbarLayout
- triggerEvent
- unloadPlugin
- Other
- Display
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.
