Page tree
Skip to end of metadata
Go to start of metadata

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:

NameTypeDescription
actionNameString'setParaTagName' tag name setting API
valueString

'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
  • No labels