Page tree

Versions Compared

Key

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

...

attribute의 값이 null인 경우 해당 속성을 제거합니다.


Example:


actionExample 1beforeExample 2after
action


Code Block
languagexml
editor.execCommand('addRunProperties', {
    className: 'Butterfly',
    attributes: {
        'title': 'Beautiful butterfly',
        'aria-label': '아름다운 나비'
    }
});
Code Block
languagexml
<span>아름다운 나비</span>
Code Block
languagexml
<span class="Butterfly" aria-label="아름다운 나비" title="Beautiful butterfly">아름다운 나비</span>



Code Block
languagexml
editor.execCommand('addRunProperties', {
    className: 'Beautiful',
    attributes: {
        'title': ''
    }
});


before


Code Block
languagexml
<span>아름다운 나비</span>



Code Block
languagexml
<span class="Butterfly" aria-label="아름다운 나비" title="Beautiful butterfly">아름다운 나비</span>


after


Code Block
languagexml
<span class="Butterfly" aria-label="아름다운 나비" title="Beautiful butterfly">아름다운 나비</span>



Code Block
languagexml
<span class="Butterfly Beautiful" aria-label="아름다운 나비">아름다운 나비</span>