PHP Class Prado\Web\UI\WebControls\THtmlArea4

THtmlArea4 wraps the visual editing functionalities provided by the version 4 of TinyMCE project {@link http://tinymce.com/}. It has been developed as a plug'n'play substitute for {@link THtmlArea}, that is based on the previous iteration (version 3) of the same project. Please note that both components can't be used together in the same page. 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://www.tinymce.com/wiki.php/Configuration for a list of options. The options can be change/added as shown in the following example. language : "de" plugins: [ advlist anchor autolink autoresize autosave bbcode charmap code contextmenu directionality emoticons fullpage fullscreen hr image importcss insertdatetime layer legacyoutput link lists media nonbreaking noneditable pagebreak paste preview print save searchreplace spellchecker tabfocus table template textcolor visualblocks visualchars wordcount ] toolbar: "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media", statusbar: false
Since: 3.0
Inheritance: extends TTextBox
Afficher le fichier Open project: pradosoft/prado

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
addAttributesToRender ( $writer ) Adds attribute name-value pairs to renderer.
copyCustomPlugins ( )
getClientClassName ( ) : string Gets the name of the javascript class responsible for performing postback for this control.
getCompressionOptions ( )
getEditorOptions ( ) : array Default editor options gives basic tool bar only.
getLanguageSuffix ( $culture ) : 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.

Method Details

__construct() public méthode

Sets default width and height.
public __construct ( )

addAttributesToRender() protected méthode

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

copyCustomPlugins() protected méthode

protected copyCustomPlugins ( )

getAutoPostBack() public méthode

public getAutoPostBack ( ) : boolean
Résultat boolean whether change of the content should cause postback. Return false if EnableVisualEdit is true.

getAvailablePlugins() public méthode

Override this method to customize.
public getAvailablePlugins ( ) : array
Résultat array list of plugins to be loaded

getAvailableThemes() public méthode

public getAvailableThemes ( ) : array
Résultat array list of available themese

getClientClassName() protected méthode

This method overrides the parent implementation.
protected getClientClassName ( ) : string
Résultat string the javascript class name

getCompressionOptions() protected méthode

Deprecation: since 3.2.3. tinyMCE4 doesn's use this anymore
protected getCompressionOptions ( )

getCulture() public méthode

Gets the current culture.
public getCulture ( ) : string
Résultat string current culture, e.g. de_AT.

getCustomPluginPath() public méthode

public getCustomPluginPath ( ) : string
Résultat string path to custom plugins to be copied.

getEditorOptions() protected méthode

Default editor options gives basic tool bar only.
protected getEditorOptions ( ) : array
Résultat array editor initialization options.

getEnableCompression() public méthode

Deprecation: since 3.2.3: tinyMCE 4 doesn't support this anymore
public getEnableCompression ( ) : boolean
Résultat boolean enable compression of the javascript files, default is true.

getEnableVisualEdit() public méthode

public getEnableVisualEdit ( ) : boolean
Résultat boolean whether to show WYSIWYG text editor. Defaults to true.

getLanguageSuffix() protected méthode

protected getLanguageSuffix ( $culture ) : string
Résultat string localized editor interface language extension.

getOptions() public méthode

Gets the list of options for the WYSIWYG (TinyMCE) editor
See also: http://www.tinymce.com/wiki.php/Configuration
public getOptions ( ) : string
Résultat string options

getTextMode() public méthode

TextMode for THtmlArea control is always 'MultiLine'
public getTextMode ( ) : string
Résultat string the behavior mode of the THtmlArea component.

loadJavascriptLibrary() protected méthode

protected loadJavascriptLibrary ( )

parseEditorOptions() protected méthode

Parse additional options set in the Options property.
protected parseEditorOptions ( $string ) : array
Résultat array additional custom options

registerEditorClientScript() protected méthode

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

setCulture() public méthode

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

setCustomPluginPath() public méthode

public setCustomPluginPath ( $value )

setEnableCompression() public méthode

Deprecation: since 3.2.3: tinyMCE 4 doesn't support this anymore
public setEnableCompression ( $value )

setEnableVisualEdit() public méthode

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

setOptions() public méthode

Sets the list of options for the WYSIWYG (TinyMCE) editor
See also: http://www.tinymce.com/wiki.php/Configuration
public setOptions ( $value )

setTextMode() public méthode

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