Set tag name of the paragraph in which the caret is positioned.
When there is a selection, tag name of the selected paragraphs is set.
Parameters:
Name | Type | Description |
---|---|---|
actionName | String | 'setParaTagName' tag name setting API |
value | String | 'P', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6' |
Example:
editor.execCommand('setParaTagName', 'P'); // Set as normal paragraph editor.execCommand('setParaTagName', 'H1'); // Set as heading 1 editor.execCommand('setParaTagName', 'H2'); // Set as heading 2