Page tree

Versions Compared

Key

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

캐럿이 위치한 문단의 줄간격을 설정합니다.

문단을 셀렉션한 경우 셀렉션한 모든 문단의 줄간격을 설정합니다Set line spacing of the paragraph in which the caret is positioned.

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


Parameters:

NameTypeDescription
actionNameString액션 이름'setLineHeight' line spacing API
lineHeightObject

{ value: {Number}, unit: {String} }

...

Code Block
languagejs
themeEmacs
editor.execCommand('setLineHeight', { value: 1.6, unit: '' });   // line 줄간격height 1.6 설정
editor.execCommand('setLineHeight', { value: 150, unit: '%' });  // line 줄간격height 150% 설정
editor.execCommand('setLineHeight', { value: 20, unit: 'px' });  // line 줄간격height 20px 설정