Page tree

Versions Compared

Key

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

Status
colourYellow
titleRELEASE 2.11.0 OR ABOVE

Updates the editing model based on .se-contents DOM을 기준으로 편집모델을 갱신합니다DOM.


Parameters:

Name

Type

Attribute

Description

optionsObject

{

    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
languagejs
themeEmacs
var paragraphs = document.querySelectorAll('.se-contents p');
paragraphs.forEach(function(para, index){ para.innerText = index + 'test'; });
editor.updateBodyModel();

...