셀렉션한 텍스트에 스타일을 추가합니다.
...
Apply the text style to the selected text.
Merge the style received as an object to the existing style.
Parameters:
Name | Type | Description |
---|---|---|
actionName | String액션 이름 | 'addRunStyle' text style adding API |
style | Object적용할 스타일 | Style object to apply |
Example:
Code Block | ||||
---|---|---|---|---|
| ||||
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 |