...
| Code Block | ||||||
|---|---|---|---|---|---|---|
| ||||||
'documentComparison.config': {
'list': { // 저장된 문서 목록 리스트에 대한 config 설정입니다.
'url': '/getDocumentVersionList',
'headers': {},
'params': {}
},
'data': { // 저장된 문서 목록 중 하나의 데이터에 대한 config 설정입니다.
'url': '/getDocumentVersionData',
'headers': {},
'headersparams': {},
'paramKey': ''
'params':}
{},
}
|
API 예제
| Code Block | ||||||
|---|---|---|---|---|---|---|
| ||||||
// SEModel(json 타입)로 에디터 열기 window.editor = new SynapEditor(editorId, that.editorConfig); window.editor.openSEModel(json); // db에서 꺼내온 json var documentComparisonPlugin = window.editor.plugins.documentComparison; if (documentComparisonPlugin) { documentComparisonPlugin.addListParam('paramKey': '' } } |
...
docId', docId); // addListParam: 문서이력 목록조회 API(ex:'/getDocumentVersionList')의 param을 추가합니다.
}
// 모델로 저장하기
var json = window.editor.getBodyModelJSON(true);
// 저장하는 API로 json을 전송해서 저장하게 해야 함 |