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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

셀렉션한 텍스트에 style, className, attributes를 추가합니다.

기존에 적용되어 있는 속성에 추가로 적용됩니다.


Parameters:

actionNamestring액션 이름
properties
Object적용할 속성
styleObject적용할 스타일
classNamestring적용할 클래스 이름
attributesObject적용할 HTML 속성


Example:

// 글자 크기, 클래스 이름('test1'), title('test1') 추가
editor.execCommand('addRunProperties', {
    style: {
        fontSize: {value: 20, unit: 'pt'}
    },
    className: 'test1',
    attributes: {
        'title': 'test1'
    }
});


// 글자 색, 클래스 이름('test2'), aria-label('test2') 추가
editor.execCommand('addRunProperties', {
    style: {
        color: {r: 255, g: 0, b: 0}
    },
    className: 'test2',
    attributes: {
        'aria-label': 'test2'
    }
});
  • No labels