bound-editor
A HTML content command for displaying and editing a String or a HTML Value stored in a Screen data variable.
The primary attribute expression of this command should resolve into the String or HTML Value to be edited. The value defines the initial content of the host element, which will then become editable by the user. The various secondary attributes define the properties of the editor, such as the editing tools available to the users.
If bound-editor
is evaluated in uneditable content (a composeContent command whose editable
attribute is false
does this), this content command's functionality becomes exactly that of the HTML content command content that will then display the resolved value of the primary attribute expression.
This command has a priority of 15 if evaluated in HTML content declared as uneditable. Otherwise its priority can be considered to be 0 compared to all other HTML content commands besides bound-repeat
, which operates at a higher priority.
Secondary attributes
bound-editor-tools | ||
---|---|---|
Required | Value type | EL-evaluated |
No | String | Yes |
This attribute can be used to define additional tools that will appear in the editing toolbar. The resolved String should list the names of the tools separated by semicolons. Names of the available additional tools are:
If not defined, the toolbar will only contain the standard tools. |
bound-editor-toolbarcolor | ||
---|---|---|
Required | Value type | EL-evaluated |
No | String | Yes |
Defines the color of the editing toolbar. The resolved value should be a hex RGB value prefixed with a hash mark, eg. "#88bbff". If not defined, the toolbar will have its default color. |
bound-editor-filterpaste | ||
---|---|---|
Required | Value type | EL-evaluated |
No | Boolean | Yes |
If this attribute's value resolves into If not defined, the value of |
bound-editor-nativespellcheck | ||
---|---|---|
Required | Value type | EL-evaluated |
No | Boolean | Yes |
If this attribute's value resolves into If not defined, the value of |
bound-editor-availablefonts | ||
---|---|---|
Required | Value type | EL-evaluated |
No | String | Yes |
This attribute can be used to define the set of font families the editor toolbar's font family tool presents. The resolved value should be a listing the family options separated by semicolons. Each family option may contain one or more similar font families separated by commas, in a way similar to how the font-family CSS property works (eg. "Times New Roman,serif;Arial,sans-serif"). Each option may also contain a label preceded by the font families, separated by a slash (eg."Times/Times New Roman,serif"). Do note that this attribute's value has no effect if the If not defined, the value "Sans-serif/sans-serif;Serif/serif" is used, giving the user a very simple font selection. |
bound-editor-defaults | ||
---|---|---|
Required | Value type | EL-evaluated |
No | Map | Yes |
This attribute allows a Map to be used to define the values of most of the other secondary attributes without actually defining them on the host element. The resolved Map should map attribute names to attribute values. If the host element has a mapped secondary attribute defined, that defined value takes precedence over the mapped value. These are the keys for secondary attributes that can be defined through the Map:
|
bound-editor-of-repeat | ||
---|---|---|
Required | Value type | EL-evaluated |
No | String | No |
This attribute can be used to link this If this attribute is used to form the link, the primary attribute expression of Note that this attribute has no effect if this command is evaluated in uneditable content. |
Examples
The bound-editor
command allows any Screen data variables with HTML Values, such as contents of a bound-repeat
's items to be edited. Any HTML-formatted, ie. rich-text fields, in Salesforce query results are a common example of this. Make use of the various secondary attributes like bound-editor-tools
to configure the editor.
<div dyn-bound-repeat="records" dyn-bound-repeat-var="record"><div dyn-bound-editor="record.richDescription" dyn-bound-editor-tools="'font;justify;table'"></div>
For an example on the use of the bound-editor-of-repeat
attribute, please see the examples section of bound-repeat
.