Page tree

Versions Compared

Key

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

셀렉션한 텍스트에 스타일을 추가합니다.

...

Apply the text style to the selected text.

Merge the style received as an object to the existing style.


Parameters:

NameTypeDescription
actionNameString액션 이름'addRunStyle' text style adding API
styleObject적용할 스타일Style object to apply


Example:

Code Block
languagejs
themeEmacs
editor.execCommand('addRunStyle', { fontSize: {value: 20, unit: 'pt'} }); // 글자Add 크기font 추가size
editor.execCommand('addRunStyle', { color: {r: 255, g: 0, b: 0} }); // 글자Add font 추가color
editor.execCommand('addRunStyle', { backgroundColor: {r: 0, g: 0, b: 255} }); // 글자Add font 배경색background 추가color