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

Version 1 Next »

Shape extends Element

도형을 영역을 편집하는데 사용되는 API 모델입니다.

Methods

append(html)

  • html <String> 추가할 HTML String.

파라메터로 넘겨받은 HTML String으로 Element의 뒤쪽에 자식으로 추가합니다.

var cell = editor.getAPIModelById('id');
cell.append('<span>TEXT</span>');

prepend(html)

  • html <String> 추가할 HTML String.

파라메터로 넘겨받은 HTML String으로 Element의 앞쪽에 자식으로 추가합니다.

var cell = editor.getAPIModelById('id');
cell.prepend('<span>TEXT</span>');

remove()

Element 자신을 제거합니다.

var paragraph = editor.getAPIModelById('id');
paragraph.remove();

replace(html)

  • html <String> 교체할 HTML String.

Element 자신을 파라메터로 넘겨받은 HTML String으로 교체합니다.

var paragraph = editor.getAPIModelById('id');
paragraph.replace('<p><span>Paragraph replaced</span></p>');

setText(text)

  • text <String> 셀 내부에 설정할 Text 문자열

파라메터로 넘겨받은 Text 문자열값을 셀의 내부 Text로 설정합니다.

var cell = editor.getAPIModelById('id');
cell.setText('텍스트입니다.');
  • No labels