Status | ||||||
---|---|---|---|---|---|---|
|
변경된 DOM을 기준으로 편집모델을 갱신합니다.
화면에 렌더링된 HTML DOM을 편집 후 편집모델에 반영하는데 사용됩니다The editing model is updated based on the changed DOM.
It is used to reflect the HTML DOM rendered on the screen to the editing model after editing.
Parameters:
Name | Type | Attribute | Description |
---|---|---|---|
beforeId | String | 변경되기전 DOM의 ID값ID value of DOM before change | |
afterId | String | 변경 후 DOM의 ID값. 기본값은 ID value of DOM after change. Default is beforeId. | |
options | Object | { skipUndoRedo: false, skipRendering: false } | APIModel의 옵션을 설정합니다 Set options for APIModel. skipUndoRedo : 이 값이 true이면 해당 모델을 통한 편집 결과는 undo/redo가 되지 않습니다. 또한 이전 undo/redo stack도 초기화됩니다.skipRendering : 이 값이 true이면 해당 모델을 통한 편집 결과는 모델에만 반영이되고 화면에 렌더링 되지 않습니다. 모든 편집이 완료된 후 editor.render() 메소드를 통해 별도로 렌더링해야 합니다: If this value is true, the result of editing through the model is not undo/redo. Also the old undo/redo stack is initialized. skipRendering : If this value is true, the results of editing through the model are reflected only in the model and not rendered on the screen. After all edits are done, you need to render them separately via editor.render() method. |
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
var p = document.getElementById('p1'); p.innerText = '텍스트를 변경합니다.'; editor.updateModel('p1'); |
...