TextEdit style attributes
Textedit presentation style attributes apply to the TEXTEDIT
element.
sanitize
By default, to avoid "Stored XSS" attacks, the front-end cleans the HTML sent to form elements to
ensure no malicious script can be executed. This security control prevents for example to use HTML
content such as "<a href='mailto: …"
.
The default for the sanitize
attribute is "yes"
.
To disable the checking of HTML content send to form elements, set the sanitize
style attribute to "no"
.
The sanitize
style attribute makes only sense for TextEdit
form
items, when used with the textFormat
style attribute set to
"html"
:
<Style name="TextEdit.relax">
<StyleAttribute name="textFormat" value="html"/>
<StyleAttribute name="sanitize" value="no"/>
</Style>
showEditToolBox
Defines if the toolbox for rich text editing is shown or not.
Only available when the textFormat
style attribute is set to "html"
.
"no"
(default): The toolbox is hidden."yes"
: The toolbox is visible.
showVirtualKeyboard
Values can be:
"onTap"
(default): Virtual keyboard shows up when user taps in the field."onFocus"
: Virtual keyboard shows up when the focus goes to the field.
textFormat
Defines the rendering of the content of the TEXTEDIT
widget.
"plain"
(default): the value assigned to this widget is interpreted as plain text."html"
, the value is interpreted as HTML (with hyperlinks), with rich text input feature enabled.Important: The HTML content displayed inside a form element using thetextFormat=html
style must not be a complete HTML document (using CSS styles for example). The content must be simple HTML, with basic tags such as text decoration like<b/>
for bold,<ul/>+<li/>
for bullet lists, and inline styles.Note: Consider using the fglrichtext web component, instead of the rich text option inTEXTEDIT
fields.For more details, see Rich Text Editing in TEXTEDIT.
wrapPolicy
Defines where the text can be wrapped in word wrap mode.
"atWordBoundary"
(default): the text will wrap at word boundaries."anywhere"
: the text breaks anywhere, splitting words if needed.