Class \Prado\Web\UI\WebControls\THtmlArea
THtmlArea wraps the visual editting functionalities provided by the TinyMCE project 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 \Prado\Web\UI\WebControls\setOptions 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.
<com:THtmlArea>
<prop:Options>
plugins : "contextmenu,paste"
language : "zh_cn"
</prop:Options>
</com:THtmlArea>
Class hierarchy
- \Prado\Web\UI\WebControls\THtmlArea
- \Prado\Web\UI\WebControls\TTextBox implements IPostBackDataHandler, IValidatable, IDataRenderer
- \Prado\Web\UI\WebControls\TWebControl implements IStyleable
- \Prado\Web\UI\TControl implements IRenderable, IBindable
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 3.0
public
|
|
public
|
|
public
|
getAvailablePlugins() : array<string|int, mixed>
Returns a list of plugins to be loaded.
Override this method to customize. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
getTextMode() : string
Overrides the parent implementation.
TextMode for THtmlArea control is always 'MultiLine' |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
setTextMode(string $value) : mixed
Overrides the parent implementation.
TextMode for THtmlArea is always 'MultiLine' and cannot be changed to others. |
protected
|
addAttributesToRender(THtmlWriter $writer) : mixed
Adds attribute name-value pairs to renderer.
This method overrides the parent implementation by registering additional javacript code. |
protected
|
|
protected
|
getClientClassName() : string
Gets the name of the javascript class responsible for performing postback for this control.
This method overrides the parent implementation. |
protected
|
|
protected
|
|
protected
|
getScriptDeploymentPath() : string
Gets the editor script base URL by publishing the tarred source via TTarAssetManager.
|
protected
|
|
protected
|
|
protected
|
parseEditorOptions(mixed $string) : array<string|int, mixed>
Parse additional options set in the Options property.
|
protected
|
registerEditorClientScript(mixed $writer) : mixed
Registers the editor javascript file and code to initialize the editor.
|