UNA
Loading...
Searching...
No Matches
BxDolEditor Class Reference
Inheritance diagram for BxDolEditor:
BxDolFactory iBxDolFactoryObject BxBaseEditorQuill BxEditorEditor BxTemplEditorQuill

Public Member Functions

 getObjectName ()
 
 setCustomConf ($s)
 
 setCustomPlugins ($sPlugins)
 
 setCustomToolbarButtons ($sButtons)
 
 getWidth ($iViewMode)
 
 getSkins ($bFullInfo=false)
 
 setSkin ($sSkin)
 
 attachEditor ($sSelector, $iViewMode, $bDynamicMode=false)
 

Static Public Member Functions

static getObjectInstance ($sObject=false, $oTemplate=false)
 
- Static Public Member Functions inherited from iBxDolFactoryObject
static getObjectInstance ($sObject)
 

Protected Member Functions

 __construct ($aObject)
 
 _addJsCss ($bDynamicMode=false)
 
 _replaceMarkers ($s, $a)
 

Protected Attributes

 $_sObject
 
 $_aObject
 
 $_sConfCustom = ''
 
 $_sButtonsCustom = false
 
 $_sPluginsCustom = false
 
 $_sSkin
 
 $_aSkins
 

Detailed Description

WYSIWYG editors.

Site owner can choose which visual editor can be user on the site.

Default visual editor is stored in 'sys_editor_default' setting option.

Creating the Category object:

Add record to 'sys_objects_editor' table:

  • object: name of the editor object, in the format: vendor prefix, underscore, module prefix, underscore, internal identifier or nothing; for example: bx_blogs - custom editor in blogs module.
  • title: title of the editor, displayed in the studio.
  • skin: editor skin, if editor suports custom/multiple skins.
  • override_class_name: user defined class name which is derived from one of base editor classes.
  • override_class_file: the location of the user defined class, leave it empty if class is located in system folders.

Example of usage

Apply visual editor to textarea:

echo '<textarea id="my_textarea" rows="20" cols="80">some text here</textarea>'; // print text area element
$oEditor = BxDolEditor::getObjectInstance(); // get default editor object instance
if ($oEditor) // check if editor is available for using
echo $oEditor->attachEditor ('#my_textarea', BX_EDITOR_STANDARD); // output HTML which will automatically apply editor to textarea element by its id
static getObjectInstance($sObject=false, $oTemplate=false)
Definition BxDolEditor.php:91
const BX_EDITOR_STANDARD
Definition BxDolEditor.php:14

Constructor & Destructor Documentation

◆ __construct()

BxDolEditor::__construct ( $aObject)
protected

Constructor

Parameters
$aObjectarray of editor options

Member Function Documentation

◆ _addJsCss()

BxDolEditor::_addJsCss ( $bDynamicMode = false)
protected

Add css/js files which are needed for editor display and functionality.

◆ _replaceMarkers()

BxDolEditor::_replaceMarkers ( $s,
$a )
protected

Replace provided markers string.

Parameters
$s- string to replace markers in
$a- markers array
Returns
string with replaces markers

◆ attachEditor()

BxDolEditor::attachEditor ( $sSelector,
$iViewMode,
$bDynamicMode = false )

Attach editor to HTML element, in most cases - textarea.

Parameters
$sSelector- jQuery selector to attach editor to.
$iViewMode- editor view mode: BX_EDITOR_STANDARD, BX_EDITOR_MINI, BX_EDITOR_FULL
$bDynamicMode- is AJAX mode or not, the HTML with editor area is loaded synamically.

◆ getObjectInstance()

static BxDolEditor::getObjectInstance ( $sObject = false,
$oTemplate = false )
static

Get editor object instance by object name

Parameters
$sObjectobject name
Returns
object instance or false on error

◆ getObjectName()

BxDolEditor::getObjectName ( )

Get object name

◆ getSkins()

BxDolEditor::getSkins ( $bFullInfo = false)

Get a list of available skins.

◆ getWidth()

BxDolEditor::getWidth ( $iViewMode)

Get minimal width which is neede for editor for the provided view mode

◆ setCustomConf()

BxDolEditor::setCustomConf ( $s)

Set custom editor configuration options

◆ setCustomPlugins()

BxDolEditor::setCustomPlugins ( $sPlugins)

Set custom plugins

◆ setCustomToolbarButtons()

BxDolEditor::setCustomToolbarButtons ( $sButtons)

Set custom toolbar


The documentation for this class was generated from the following file: