Sets paragraph properties of the paragraph in which the caret is positioned.
When there is a selection, paragraph properties of the selected paragraphs are set.
Parameters:
Name | Type | Description |
---|---|---|
actionName | String | 'addParagraphProperties' paragraph properties setting API |
properties | Object | { id: {String}, className: {String}, style: {Object} } |
Example:
editor.execCommand('addParagraphProperties', { id: 'paragraph-id' }); // id editor.execCommand('addParagraphProperties', { className: 'custom-class-name' }); // class editor.execCommand('addParagraphProperties', { style: { margin: { top: 20, left: 20 } } }); // margin editor.execCommand('addParagraphProperties', { style: { padding: { bottom: 30, right: 30 } } }); // padding