Page tree
Skip to end of metadata
Go to start of metadata

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} }


Example:

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
  • No labels