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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

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 Title1
editor.execCommand('setParaTagName', 'H2'); // Set as Title2
  • No labels