[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/framework/Web/UI/WebControls/ -> THtmlArea.php (sommaire)

THtmlArea class file.

Author: Wei Zhuo
Copyright: Copyright © 2006 PradoSoft
License: http://www.pradosoft.com/license/
Version: $Id: THtmlArea.php 1397 2006-09-07 07:55:53Z wei $
Poids: 330 lignes (10 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

THtmlArea:: (17 méthodes):
  __construct()
  getTextMode()
  setTextMode()
  getAutoPostBack()
  getEnableVisualEdit()
  setEnableVisualEdit()
  getCulture()
  setCulture()
  getOptions()
  setOptions()
  addAttributesToRender()
  registerEditorClientScript()
  getScriptUrl()
  getScriptDeploymentPath()
  getEditorOptions()
  parseEditorOptions()
  getLanguageSuffix()


Classe: THtmlArea  - X-Ref

THtmlArea class

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 <b>Text</b> property.

To enable the visual editting on the client side, set the property
<b>EnableVisualEdit</b> to true (which is default value).
To set the size of the editor when the visual editting is enabled,
set the <b>Width</b> and <b>Height</b> properties instead of
<b>Columns</b> and <b>Rows</b> 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.
<code>
<com:THtmlArea>
<prop:Options>
plugins : "contextmenu,paste"
language : "zh_cn"
</prop:Options>
</com:THtmlArea>
</code>

Compatibility
The client-side visual editting capability is supported by
Internet Explorer 5.0+ for Windows and Gecko-based browser.
If the browser does not support the visual editting,
a traditional textarea will be displayed.

Browser support

<code>
Windows XP        MacOS X 10.4
----------------------------------------------------
MSIE 6                  OK
MSIE 5.5 SP2            OK
MSIE 5.0                OK
Mozilla 1.7.x           OK              OK
Firefox 1.0.x           OK              OK
Firefox 1.5b2           OK              OK
Safari 2.0 (412)                        OK(1)
Opera 9 Preview 1       OK(1)           OK(1)
----------------------------------------------------
* (1) - Partialy working
----------------------------------------------------
</code>

__construct()   X-Ref
Constructor.
Sets default width and height.


getTextMode()   X-Ref
Overrides the parent implementation.
TextMode for THtmlArea control is always 'MultiLine'

return: string the behavior mode of the THtmlArea component.

setTextMode($value)   X-Ref
Overrides the parent implementation.
TextMode for THtmlArea is always 'MultiLine' and cannot be changed to others.

param: string the text mode

getAutoPostBack()   X-Ref

return: boolean whether change of the content should cause postback. Return false if EnableVisualEdit is true.

getEnableVisualEdit()   X-Ref

return: boolean whether to show WYSIWYG text editor. Defaults to true.

setEnableVisualEdit($value)   X-Ref
Sets whether to show WYSIWYG text editor.

param: boolean whether to show WYSIWYG text editor

getCulture()   X-Ref
Gets the current culture.

return: string current culture, e.g. en_AU.

setCulture($value)   X-Ref
Sets the culture/language for the html area

param: string a culture string, e.g. en_AU.

getOptions()   X-Ref
Gets the list of options for the WYSIWYG (TinyMCE) editor

return: string options

setOptions($value)   X-Ref
Sets the list of options for the WYSIWYG (TinyMCE) editor

param: string options

addAttributesToRender($writer)   X-Ref
Adds attribute name-value pairs to renderer.
This method overrides the parent implementation by registering
additional javacript code.

param: THtmlWriter the writer used for the rendering purpose

registerEditorClientScript($writer)   X-Ref
Registers the editor javascript file and code to initialize the editor.


getScriptUrl()   X-Ref

return: string editor script URL.

getScriptDeploymentPath()   X-Ref
Gets the editor script base URL by publishing the tarred source via TTarAssetManager.

return: string URL base path to the published editor script

getEditorOptions()   X-Ref
Default editor options gives basic tool bar only.

return: array editor initialization options.

parseEditorOptions($string)   X-Ref
Parse additional options set in the Options property.

return: array additional custom options

getLanguageSuffix($culture)   X-Ref

return: string localized editor interface language extension.



Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7