Skip to content
Sahi Pro Flowcharts is retired. These pages document the last release (v12) and are no longer updated. Go to the current documentation.Flowcharts is retired. Current docs
Get Free Trial
Sahi Pro Flowcharts is retired. These pages document the last release (v12) and are no longer updated. Go to the current documentation.

Rich Text Editors (RTE)

Rich Text Editors (RTEs) are iframes/divs whose designMode or contentEditable property is set to true. Such components allow input of text and formatting them (making text bold, inserting images etc.)

Rich Text Editors do not respond to regular events and need to be handled specifically.

Modes Browser

Parameters

NameTypeDescription
$elHTML DOM elementElement which is content editable (eg. _rte(0))

Returns

stringText inside a rich text editor (without the html formatting)
Raw script
// get the rich text editor's text content
var $rteText = _rteText(_rte("rteId"));
// $rteText may look like "Hi there"

Sahi Pro Classic API _rteText

Modes Browser

Parameters

NameTypeDescription
$elHTML DOM elementElement which is content editable (eg. _rte(0))

Returns

stringHTML content inside a rich text editor (without the html formatting)
Raw script
// get the rich text editor's HTML content
var $rteHTML = _rteHTML(_rte("rteId"));
// $rteHTML may look like "Hi <b>there</b>"

Sahi Pro Classic API _rteHTML

Modes Browser

Replaces the content of the RTE with given HTML. Note that this does not simulate all events like other Sahi APIs. Rte Write only replaces the content of the iframe.

Parameters

NameTypeDescription
$rteHTML DOM elementRTE to write into
$htmlstringhtml to write
Raw script
_rteWrite(_rte("editor"), "Hi <b>user</b>");

Sahi Pro Classic API _rteWrite