Represents an editable region in the page preview. Returned by
the createTextEditableRegion() method. Additionally, you can call
setContent to update the region's content programmatically.
Type
Object
Properties
Replaces the editable region's content programmatically.
Available on: TextEditableRegion.
Show examplesHide examples
In this example, we mount an editable region, then set its content programmatically.
JavaScript
Copied to clipboard
const region = await api.createTextEditableRegion(element, onChange);
region.setContent('<p>New content</p>');