...
기존에 적용되어 있는 속성에 추가로 적용됩니다.
Parameters:
| actionName | string | 액션 이름 | |
| propertiesObject | Object | 적용할 속성 | |
| style | Object | 적용할 스타일 | |
| className | string | 적용할 클래스 이름 | |
| attribute | Object | 적용할 HTML 속성 | |
Example:
| Code Block | ||
|---|---|---|
| ||
// 글자 크기, 클래스 이름('test1'), title('test1') 추가
editor.execCommand('addRunProperties', {
style: {
fontSize: {value: 20, unit: 'pt'}
},
className: 'test1',
attribute: {
'title': 'test1'
}
});
// 글자 크기, 클래스 이름('test2'), aria-label('test2') 추가
editor.execCommand('addRunProperties', {
style: {
color: {r: 255, g: 0, b: 0}
},
className: 'test2',
attribute: {
'aria-label': 'test2'
}
}); |
...
editor.execCommand('addRunProperties', {style: {fontSize: {value: 20, unit: 'pt'} }}); // 글자 크기 추가editor.execCommand('addRunProperties', { color: {r: 255, g: 0, b: 0} }); // 글자 색 추가editor.execCommand('addRunProperties', { backgroundColor: {r: 0, g: 0, b: 255} }); // 글자 배경색 추가
...