Set alignment of the paragraph in which the caret is positioned.
When there is a selection, alignment of the selected paragraphs is set.
Parameters:
Name | Type | Description |
---|---|---|
actionName | String | 'align' paragraph alignment API |
vlaue | String | '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