Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

캐럿이 위치한 문단의 속성을 설정합니다.

...

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:

NameTypeDescription
actionNameString액션 이름'addParagraphProperties' paragraph properties setting API
propertiesObject

{  id: {String}, className: {String}, style: {Object} }설정할 속성


Example:

Code Block
languagejs
themeEmacs
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 설정