BiRichEdit
This control is used to to provide rich text editing of HTML documents
This class extends BiIframe and therefore all methods and fields available for BiIframe are also available for BiRichEdit .
Constructor
new BiRichEdit ( )
Parameters
No parameters.
Properties
Methods
| Name | Description |
addCssRule | Adds a CSS rule to the content document |
execCommand | Executes a command on the rich text editor. For a list of supported commands see MSDN. The method returns true if the command was successful. |
insertHtml | Inserts html at the current caret position |
queryCommandEnabled | Returns a boolean value that tells whether the given command will succeed if executed. |
queryCommandState | Returns a boolean value that represents the state of the given command. |
queryCommandValue | Returns the current value for the given command. |
removeCssRule | Removes all CSS rules that matches the given selector |
Events
None.
Static Methods
None.
Static Fields
None.
Remarks
Do not confuse the command methods with the BiCommand Bindows command concept. The command methods are used to change the content of the editor.
Method Details
addCssRule
Adds a CSS rule to the content document
Syntax
object.addCssRule ( sSelector,sStyle ) Parameters
| Name | Type | Optional | Default | Descripton |
sSelector | String | The selector describing which elements the rule applies to | ||
sStyle | String | The CSS text describing the style of the rule. |
Return Type
void
execCommand
Executes a command on the rich text editor. For a list of supported commands see MSDN. The method returns true if the command was successful.
Syntax
object.execCommand ( sCommand [ ,bUi [ ,oCommandValue ] ] ) Parameters
| Name | Type | Optional | Default | Descripton |
sCommand | String | The command to execute | ||
bUi | Boolean | ![]() | false | Whether to show a dialog where extra arguments can be entered |
oCommandValue | Object | ![]() | Some commands takes an argument. In those cases this argument is used |
Return Type
Boolean
insertHtml
Inserts html at the current caret position
Syntax
object.insertHtml ( sHtml ) Parameters
| Name | Type | Optional | Default | Descripton |
sHtml | String | Html to insert |
Return Type
void
queryCommandEnabled
Returns a boolean value that tells whether the given command will succeed if executed.
Syntax
object.queryCommandEnabled ( sCommand ) Parameters
| Name | Type | Optional | Default | Descripton |
sCommand | String | The command to check whether enabled |
Return Type
Boolean
queryCommandState
Returns a boolean value that represents the state of the given command.
Syntax
object.queryCommandState ( sCommand ) Parameters
| Name | Type | Optional | Default | Descripton |
sCommand | String | The command to get the state for |
Return Type
Boolean
queryCommandValue
Returns the current value for the given command.
Syntax
object.queryCommandValue ( sCommand ) Parameters
| Name | Type | Optional | Default | Descripton |
sCommand | String | The command to get the value for |
Return Type
Object
removeCssRule
Removes all CSS rules that matches the given selector
Syntax
object.removeCssRule ( sSelector ) Parameters
| Name | Type | Optional | Default | Descripton |
sSelector | String | The selector describing which rules to remove. |
Return Type
void
