Page tree

Versions Compared

Key

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

캐럿이 위치한 문단에 정렬을 설정합니다.

...

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'

...

Code Block
languagejs
themeEmacs
editor.execCommand('align', 'left'); // 왼쪽Left 정렬align
editor.execCommand('align', 'center'); // 가운데Center 정렬align
editor.execCommand('align', 'right'); // 오른쪽Right 정렬align
editor.execCommand('align', 'justify'); // 양쪽Justify 정렬align