|
Class THtmlArea
THtmlArea class
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 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.
<com:THtmlArea>
<prop:Options>
plugins : "contextmenu,paste"
language : "zh_cn"
</prop:Options>
</com:THtmlArea>
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
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
----------------------------------------------------
-
TComponent
-
TApplicationComponent
-
TControl
implements
IRenderable,
IBindable
-
TWebControl
implements
IStyleable
-
TTextBox
implements
IPostBackDataHandler,
IValidatable,
IDataRenderer
-
THtmlArea
Methods summary
public
|
#
__construct( )
Constructor. Sets default width and height.
Constructor. Sets default width and height.
Overrides
|
public
string
|
#
getTextMode( )
Overrides the parent implementation. TextMode for THtmlArea control is always
'MultiLine'
Overrides the parent implementation. TextMode for THtmlArea control is always
'MultiLine'
Returns
string the behavior mode of the THtmlArea component.
Overrides
|
public
|
#
setTextMode( string $value )
Overrides the parent implementation. TextMode for THtmlArea is always
'MultiLine' and cannot be changed to others.
Overrides the parent implementation. TextMode for THtmlArea is always
'MultiLine' and cannot be changed to others.
Parameters
- $value
string the text mode
Throws
Overrides
|
public
boolean
|
#
getAutoPostBack( )
Returns
boolean whether change of the content should cause postback. Return false if
EnableVisualEdit is true.
Overrides
|
public
boolean
|
#
getEnableVisualEdit( )
Returns
boolean whether to show WYSIWYG text editor. Defaults to true.
|
public
|
#
setEnableVisualEdit( boolean $value )
Sets whether to show WYSIWYG text editor.
Sets whether to show WYSIWYG text editor.
Parameters
- $value
boolean whether to show WYSIWYG text editor
|
public
string
|
#
getCulture( )
Gets the current culture.
Gets the current culture.
Returns
string current culture, e.g. en_AU.
|
public
|
#
setCulture( string $value )
Sets the culture/language for the html area
Sets the culture/language for the html area
Parameters
- $value
string a culture string, e.g. en_AU.
|
public
string
|
#
getOptions( )
Gets the list of options for the WYSIWYG (TinyMCE) editor
Gets the list of options for the WYSIWYG (TinyMCE) editor
Returns
string options
See
|
public
|
#
setOptions( string $value )
Sets the list of options for the WYSIWYG (TinyMCE) editor
Sets the list of options for the WYSIWYG (TinyMCE) editor
Parameters
See
|
public
|
#
setCustomPluginPath( string $value )
Parameters
- $value
string path to custom plugins to be copied.
|
public
string
|
#
getCustomPluginPath( )
Returns
string path to custom plugins to be copied.
|
public
boolean
|
#
getEnableCompression( )
Returns
boolean enable compression of the javascript files, default is true.
|
public
|
#
setEnableCompression( boolean $value )
Parameters
- $value
boolean enable compression of the javascript files, default is true.
|
protected
|
#
addAttributesToRender( THtmlWriter $writer )
Adds attribute name-value pairs to renderer. This method overrides the parent
implementation by registering additional javacript code.
Adds attribute name-value pairs to renderer. This method overrides the parent
implementation by registering additional javacript code.
Parameters
- $writer
THtmlWriter
the writer used for the rendering purpose
Overrides
|
public
array
|
#
getAvailablePlugins( )
Returns a list of plugins to be loaded. Override this method to
customize.
Returns a list of plugins to be loaded. Override this method to
customize.
Returns
array list of plugins to be loaded
|
public
array
|
#
getAvailableThemes( )
Returns
array list of available themese
|
protected
|
#
getCompressionOptions( )
|
protected
|
#
loadJavascriptLibrary( )
|
protected
|
#
registerEditorClientScript( mixed $writer )
Registers the editor javascript file and code to initialize the editor.
Registers the editor javascript file and code to initialize the editor.
|
protected
string
|
#
getScriptUrl( )
Returns
string editor script URL.
|
protected
string
|
#
getScriptDeploymentPath( )
Gets the editor script base URL by publishing the tarred source via
TTarAssetManager.
Gets the editor script base URL by publishing the tarred source via
TTarAssetManager.
Returns
string URL base path to the published editor script
|
protected
|
#
copyCustomPlugins( mixed $url )
|
protected
array
|
#
getEditorOptions( )
Default editor options gives basic tool bar only.
Default editor options gives basic tool bar only.
Returns
array editor initialization options.
|
protected
array
|
#
parseEditorOptions( mixed $string )
Parse additional options set in the Options property.
Parse additional options set in the Options property.
Returns
array additional custom options
|
protected
string
|
#
getLanguageSuffix( mixed $culture )
Returns
string localized editor interface language extension.
|
protected
string
|
#
getClientClassName( )
Gets the name of the javascript class responsible for performing postback for
this control. This method overrides the parent implementation.
Gets the name of the javascript class responsible for performing postback for
this control. This method overrides the parent implementation.
Returns
string the javascript class name
Overrides
|
Methods inherited from TTextBox
getAutoCompleteType(),
getAutoTrim(),
getCausesValidation(),
getColumns(),
getData(),
getDataChanged(),
getEnableClientScript(),
getIsValid(),
getMaxLength(),
getPersistPassword(),
getPostBackOptions(),
getReadOnly(),
getRows(),
getSafeText(),
getSafeTextParser(),
getTagName(),
getText(),
getValidationGroup(),
getValidationPropertyValue(),
getWrap(),
loadPostData(),
onTextChanged(),
raisePostDataChangedEvent(),
renderBeginTag(),
renderClientControlScript(),
renderContents(),
setAutoCompleteType(),
setAutoPostBack(),
setAutoTrim(),
setCausesValidation(),
setColumns(),
setData(),
setEnableClientScript(),
setIsValid(),
setMaxLength(),
setPersistPassword(),
setReadOnly(),
setRows(),
setText(),
setValidationGroup(),
setWrap()
|
Methods inherited from TWebControl
clearStyle(),
copyBaseAttributes(),
createStyle(),
getAccessKey(),
getBackColor(),
getBorderColor(),
getBorderStyle(),
getBorderWidth(),
getCssClass(),
getDecorator(),
getDisplay(),
getEnsureId(),
getFont(),
getForeColor(),
getHasStyle(),
getHeight(),
getStyle(),
getTabIndex(),
getToolTip(),
getWidth(),
onPreRender(),
render(),
renderEndTag(),
setAccessKey(),
setBackColor(),
setBorderColor(),
setBorderStyle(),
setBorderWidth(),
setCssClass(),
setDisplay(),
setEnsureId(),
setForeColor(),
setHeight(),
setStyle(),
setTabIndex(),
setToolTip(),
setWidth()
|
Methods inherited from TControl
__get(),
addParsedObject(),
addToPostDataLoader(),
addedControl(),
applyStyleSheetSkin(),
autoBindProperty(),
autoDataBindProperties(),
bindProperty(),
broadcastEvent(),
bubbleEvent(),
clearChildState(),
clearControlState(),
clearNamingContainer(),
clearViewState(),
convertUniqueIdToClientId(),
createChildControls(),
createControlCollection(),
dataBind(),
dataBindChildren(),
dataBindProperties(),
ensureChildControls(),
findControl(),
findControlsByID(),
findControlsByType(),
focus(),
getAdapter(),
getAllowChildControls(),
getAttribute(),
getAttributes(),
getChildControlsCreated(),
getClientID(),
getControlStage(),
getControlState(),
getControls(),
getCustomData(),
getEnableTheming(),
getEnableViewState(),
getEnabled(),
getHasAdapter(),
getHasAttributes(),
getHasChildInitialized(),
getHasControls(),
getHasInitialized(),
getHasLoaded(),
getHasLoadedPostData(),
getHasPreRendered(),
getID(),
getIsSkinApplied(),
getNamingContainer(),
getPage(),
getParent(),
getRegisteredObject(),
getSkinID(),
getSourceTemplateControl(),
getTemplateControl(),
getUniqueID(),
getViewState(),
getVisible(),
hasAttribute(),
initRecursive(),
isDescendentOf(),
isObjectRegistered(),
loadRecursive(),
loadState(),
loadStateRecursive(),
onDataBinding(),
onInit(),
onLoad(),
onUnload(),
preRenderRecursive(),
raiseBubbleEvent(),
registerObject(),
removeAttribute(),
removedControl(),
renderChildren(),
renderControl(),
saveState(),
saveStateRecursive(),
setAdapter(),
setAttribute(),
setChildControlsCreated(),
setControlStage(),
setControlState(),
setCustomData(),
setEnableTheming(),
setEnableViewState(),
setEnabled(),
setID(),
setPage(),
setSkinID(),
setTemplateControl(),
setViewState(),
setVisible(),
trackViewState(),
traverseChildControls(),
unbindProperty(),
unloadRecursive(),
unregisterObject()
|
Methods inherited from TComponent
__call(),
__destruct(),
__isset(),
__set(),
__sleep(),
__unset(),
__wakeup(),
asa(),
attachBehavior(),
attachBehaviors(),
attachClassBehavior(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
clearBehaviors(),
createdOnTemplate(),
detachBehavior(),
detachBehaviors(),
detachClassBehavior(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
evaluateStatements(),
fxAttachClassBehavior(),
fxDetachClassBehavior(),
getAutoGlobalListen(),
getBehaviorsEnabled(),
getClassHierarchy(),
getEventHandlers(),
getListeningToGlobalEvents(),
getSubProperty(),
hasEvent(),
hasEventHandler(),
hasProperty(),
isa(),
listen(),
raiseEvent(),
setSubProperty(),
unlisten()
|
Constants inherited from TControl
AUTOMATIC_ID_PREFIX,
CLIENT_ID_SEPARATOR,
CS_CHILD_INITIALIZED,
CS_CONSTRUCTED,
CS_INITIALIZED,
CS_LOADED,
CS_PRERENDERED,
CS_STATE_LOADED,
ID_FORMAT,
ID_SEPARATOR,
IS_CHILD_CREATED,
IS_CREATING_CHILD,
IS_DISABLE_THEMING,
IS_DISABLE_VIEWSTATE,
IS_ID_SET,
IS_SKIN_APPLIED,
IS_STYLESHEET_APPLIED,
RF_ADAPTER,
RF_AUTO_BINDINGS,
RF_CHILD_STATE,
RF_CONTROLS,
RF_CONTROLSTATE,
RF_DATA_BINDINGS,
RF_EVENTS,
RF_NAMED_CONTROLS,
RF_NAMED_CONTROLS_ID,
RF_NAMED_OBJECTS,
RF_SKIN_ID
|
|