Page tree

Versions Compared

Key

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

Status
title릴리즈 2.3.0 이상


Anchor
openDocumentByURL
openDocumentByURL
openDocumentByURL


에디터 객체에 URL을 입력 받으면 임포트 할 수 있는 API를 제공합니다.


Parameters:

Name

Type

Description

urlstring문서가 존재하는 URL


Example:

Code Block
languagejs
themeEmacs
const url = '/resource/test.docx';
editor.openDocumentByURL(url);



에디터 초기화 활용법은 서버에서 문서를 변환한 결과 데이터(pbData, importPath)들을 에디터 초기화 할때 넘겨줍니다.

Example:

Code Block
languagejs
themeEmacs
const pbData = [10, ...]; // 서버에서 받은 PB 데이터
const importPath = ''; // 문서 변환 결과가 있는 경로(브라우저에서 접근할 수 있는 상대경로여야 함.)
 
//에디터 객체 생성 후, initSEModel을 이용하면 됨.
const editor = new SynapEditor(...);
editor.initSEModel({
   ...
   pbData,
   importPath,
   ...
}) {
   ...
}