PHP Класс Prado\Web\UI\WebControls\THtmlArea

THtmlArea wraps the visual editting functionalities provided by the TinyMCE project {@link http://tinymce.moxiecode.com/}. THtmlArea displays a WYSIWYG text area on the Web page for user input in the HTML format. The text displayed in the THtmlArea component is specified or determined by using the Text property. To enable the visual editting on the client side, set the property EnableVisualEdit to true (which is default value). To set the size of the editor when the visual editting is enabled, set the Width and Height properties instead of Columns and Rows because the latter has no meaning under the situation. The default editor gives only the basic tool bar. To change or add additional tool bars, use the {@link setOptions Options} property to add additional editor options with each options on a new line. See http://tinymce.moxiecode.com/tinymce/docs/index.html for a list of options. The options can be change/added as shown in the following example. plugins : "contextmenu,paste" language : "zh_cn"
С версии: 3.0
Наследование: extends TTextBox
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( ) Constructor.
getAutoPostBack ( ) : boolean
getAvailablePlugins ( ) : array Returns a list of plugins to be loaded.
getAvailableThemes ( ) : array
getCulture ( ) : string Gets the current culture.
getCustomPluginPath ( ) : string
getEnableCompression ( ) : boolean
getEnableVisualEdit ( ) : boolean
getOptions ( ) : string Gets the list of options for the WYSIWYG (TinyMCE) editor
getTextMode ( ) : string Overrides the parent implementation.
setCulture ( $value ) Sets the culture/language for the html area
setCustomPluginPath ( $value )
setEnableCompression ( $value )
setEnableVisualEdit ( $value ) Sets whether to show WYSIWYG text editor.
setOptions ( $value ) Sets the list of options for the WYSIWYG (TinyMCE) editor
setTextMode ( $value ) Overrides the parent implementation.

Защищенные методы

Метод Описание
addAttributesToRender ( $writer ) Adds attribute name-value pairs to renderer.
copyCustomPlugins ( $url )
getClientClassName ( ) : string Gets the name of the javascript class responsible for performing postback for this control.
getEditorOptions ( ) : array Default editor options gives basic tool bar only.
getLanguageSuffix ( $culture ) : string
getScriptDeploymentPath ( ) : string Gets the editor script base URL by publishing the tarred source via TTarAssetManager.
getScriptUrl ( ) : string
loadJavascriptLibrary ( )
parseEditorOptions ( $string ) : array Parse additional options set in the Options property.
registerEditorClientScript ( $writer ) Registers the editor javascript file and code to initialize the editor.

Описание методов

__construct() публичный Метод

Sets default width and height.
public __construct ( )

addAttributesToRender() защищенный Метод

This method overrides the parent implementation by registering additional javacript code.
protected addAttributesToRender ( $writer )

copyCustomPlugins() защищенный Метод

protected copyCustomPlugins ( $url )

getAutoPostBack() публичный Метод

public getAutoPostBack ( ) : boolean
Результат boolean whether change of the content should cause postback. Return false if EnableVisualEdit is true.

getAvailablePlugins() публичный Метод

Override this method to customize.
public getAvailablePlugins ( ) : array
Результат array list of plugins to be loaded

getAvailableThemes() публичный Метод

public getAvailableThemes ( ) : array
Результат array list of available themese

getClientClassName() защищенный Метод

This method overrides the parent implementation.
protected getClientClassName ( ) : string
Результат string the javascript class name

getCulture() публичный Метод

Gets the current culture.
public getCulture ( ) : string
Результат string current culture, e.g. en_AU.

getCustomPluginPath() публичный Метод

public getCustomPluginPath ( ) : string
Результат string path to custom plugins to be copied.

getEditorOptions() защищенный Метод

Default editor options gives basic tool bar only.
protected getEditorOptions ( ) : array
Результат array editor initialization options.

getEnableCompression() публичный Метод

Устаревший: since 4.0
public getEnableCompression ( ) : boolean
Результат boolean enable compression of the javascript files, default is false.

getEnableVisualEdit() публичный Метод

public getEnableVisualEdit ( ) : boolean
Результат boolean whether to show WYSIWYG text editor. Defaults to true.

getLanguageSuffix() защищенный Метод

protected getLanguageSuffix ( $culture ) : string
Результат string localized editor interface language extension.

getOptions() публичный Метод

Gets the list of options for the WYSIWYG (TinyMCE) editor
См. также: http://tinymce.moxiecode.com/tinymce/docs/index.html
public getOptions ( ) : string
Результат string options

getScriptDeploymentPath() защищенный Метод

Gets the editor script base URL by publishing the tarred source via TTarAssetManager.
protected getScriptDeploymentPath ( ) : string
Результат string URL base path to the published editor script

getScriptUrl() защищенный Метод

protected getScriptUrl ( ) : string
Результат string editor script URL.

getTextMode() публичный Метод

TextMode for THtmlArea control is always 'MultiLine'
public getTextMode ( ) : string
Результат string the behavior mode of the THtmlArea component.

loadJavascriptLibrary() защищенный Метод

protected loadJavascriptLibrary ( )

parseEditorOptions() защищенный Метод

Parse additional options set in the Options property.
protected parseEditorOptions ( $string ) : array
Результат array additional custom options

registerEditorClientScript() защищенный Метод

Registers the editor javascript file and code to initialize the editor.
protected registerEditorClientScript ( $writer )

setCulture() публичный Метод

Sets the culture/language for the html area
public setCulture ( $value )

setCustomPluginPath() публичный Метод

public setCustomPluginPath ( $value )

setEnableCompression() публичный Метод

Устаревший: since 4.0
public setEnableCompression ( $value )

setEnableVisualEdit() публичный Метод

Sets whether to show WYSIWYG text editor.
public setEnableVisualEdit ( $value )

setOptions() публичный Метод

Sets the list of options for the WYSIWYG (TinyMCE) editor
См. также: http://tinymce.moxiecode.com/tinymce/docs/index.html
public setOptions ( $value )

setTextMode() публичный Метод

TextMode for THtmlArea is always 'MultiLine' and cannot be changed to others.
public setTextMode ( $value )