Control: HTML

 Show all Hide all

Lets the user enter HTML using a WYSIWYG editor.

It is possbile to add custom buttons to an HTML control using the HTML editor toolbar buttons menu item in the admin menu group. Useful JavaScript functions for these buttons are described below.

The JavaScript functions pasteHtml(fieldName, htmlCode) and setHtml(fieldName, htmlCode) can be used to insert HTML into the editor. In addition, getHtml(fieldName) and getSelectedHtml(fieldName) can be used to get the HTML.

Start value: HTML to display in the editor.
Return value: HTML entered by the user.

Control container: NewEdit

Supported in: NewEdit

Default value

SQL Call: Default value

Retrieves the default value for the control.
Supports custom errors: No
May modify database: No

Resultset: Default value

Repeat mode: repeated exactly once
Row count: exactly one row


<column with ordinal 1> mandatory string
The default value


SQL Call: Validation

Performs field validation when the user leaves the field or one of its dependencies is changed. This call is only made if there is a field validation of type SQL set for the field info.
Supports custom errors: No
May modify database: No


@Value mandatory string
The value of the field, the procedure will not be called if value is NULL.

Resultset: Validation messages

Repeat mode: repeated zero or one time
Row count: zero or one row


Error optional string
Error message to display. Blocks the user from saving.
Info optional string
Informative message to display. Does not block saving.

Best practice

Styles and CSS

Use the Stylesheet setting to apply a specific stylesheet, both to the HTML-canvas and the font-style dropdown. Feel free to create and use a custom stylesheet when suitable.

Additionally, the function SoftadminApi.Css_StyleSheet can be used to fetch a stylesheet definition for later use, for example when sending email messages created using the HTML editor.