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

Set alignment of the paragraph in which the caret is positioned.

When there is a selection, alignment of the selected paragraphs is set.


Parameters:

NameTypeDescription
actionNameString'align' paragraph alignment API
vlaueString'left', 'center', 'right', 'justify'


Example:

editor.execCommand('align', 'left'); // Left align
editor.execCommand('align', 'center'); // Center align
editor.execCommand('align', 'right'); // Right align
editor.execCommand('align', 'justify'); // Justify align
  • No labels