openSEModel

3.1.0 버전부터 지원, 2.19.0 버전부터 지원합니다.

SEModel(Synap Editor 모델)로 문서를 엽니다.

매개변수

이름타입설명
modelObject | stringSEModel (JSON 타입) | SEModel (string 타입)
optionsObject문서를 열기 위한 옵션 객체입니다. 아래 options를 참고합니다.

options

{
    loadingProgress = true,    // Whether to show the loading progress. (Default: true)
    callback: function() {},    // Callback function to be called after completion
    bAsync: false,              // Synchronous processing (Default: false)
    bFocus: true,               // Focus on the editor after opening the document (Default: true)
    clearDirty: true,           // Save whether the body has been edited (Default: true)
    useAltImage: true           // Alternative image conversion (Default: true)
}

예시

var json = editor.getBodyModelJSON();
editor.openSEModel(json);

var jsonStr = editor.getBodyModelJSON(true);
editor.openSEModel(json);

관련 정보

  • getBodyModelJSON