Brick Global  1.0.0

Abricos! User Interface Library > Sys > Brick.widget.Editor
Filters

Class Brick.widget.Editor - extends YAHOO.util.Element

Прототип редактора.

Constructor

Brick.widget.Editor ( el , attrs )
Parameters:
el <String/HTMLElement> HTML элемент TEXTAREA.
attrs <Object> Object liternal containing configuration parameters.

Properties

CURRENT_VISUAL_EDITOR - static object

Имя текущего визуального редактора.
Default Value: tinymce

MODE_CODE - static String

Режим редактора "Код HTML"

MODE_VISUAL - static String

Режим редактора "Визуальный"

TOOLBAR_FULL - static String

Режим панели инструментов - Расширеный.

TOOLBAR_MINIMAL - static String

Режим панели инструментов - Минимальный.

TOOLBAR_STANDART - static String

Режим панели инструментов - Средний.

Methods

destroy

void destroy ( )
Отписаться от всех событий, удалить обертку элемента TEXTAREA, вызвать destroy визуального редактора, если он был создан.
Returns: void

getContent

String getContent ( )
Получить текст из текстового редактора.
Returns: String

getEditorById

static void getEditorById ( Идентификатор )
Получить объект Editor по HTML идентификатору .
Parameters:
Идентификатор <String> HTML элемента.
Returns: void

insertValue

void insertValue ( text )
Вставить текст по положению курсора в текстовый редактор.
Parameters:
text <String>
Returns: void

setContent

void setContent ( text )
Установить текст в текстовый редактор.
Parameters:
text <String>
Returns: void

Events

configButtonsChange

configButtonsChange ( event )
Fires when the value for the configuration attribute 'configButtons' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

fileManagerChange

fileManagerChange ( event )
Fires when the value for the configuration attribute 'fileManager' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

modeChange

modeChange ( event )
Fires when the value for the configuration attribute 'mode' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

toolbarChange

toolbarChange ( event )
Fires when the value for the configuration attribute 'toolbar' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

veNameChange

veNameChange ( event )
Fires when the value for the configuration attribute 'veName' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

Configuration Attributes

configButtons - Boolean

Показать кнопки конфигурации редактора (группа кнопок справа).
Default Value: true

fileManager - Boolean

Показать кнопку вызова менеджера файлов. Если модуль "Менеджер файлов" не установлен, кнопка будет скрыта в любом случае.
Default Value: true

mode - String

Режим работы редактора.
Атрибут принимает следующие значения: MODE_CODE | MODE_VISUAL.
Примечание: для режима визуального редактора, должен быть указан артибут veName

toolbar - String

Режим панели инструментов.
Атрибут принимает следующие значения: TOOLBAR_FULL | TOOLBAR_STANDART | TOOLBAR_MINIMAL.

veName - String

Имя модуля платформы Abricos, который содержит в себе реализацию визуального редактора.