Page tree

Versions Compared

Key

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

Status
colourYellow
title

...

Release 2.3.0

...

or Above

API to import document by entering URL in the Editor object.


Parameters:

Name

Type

Description

urlstring문서 Document URL


Example:

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

참고) 문서 변환 결과를 이용한 에디터 초기화 방법

...



Note) Editor Initialization through Document Conversion Result

Transfer result data of converting documents in the server (pbData, importPath) 들을 에디터 초기화 할때 넘겨줍니다when the Editor is initialized.

Example:

Code Block
languagejs
themeEmacs
const pbData = [10, ...]; // 서버에서 받은 PB 데이터PB data received from the server
const importPath = ''; // 문서 변환 결과가 있는 경로(브라우저에서 접근할 수 있는 상대경로여야 함 Path in which the document conversion result exists (it shall be relative path to which the browser can access.)
 
//에디터Use 객체initSEModel 생성after 후,generating initSEModel을Editor 이용하면 됨object.
const editor = new SynapEditor(...);
editor.initSEModel({
   ...
   pbData,
   importPath,
   ...
}) {
   ...
}

...