Page tree

Versions Compared

Key

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

...

configscript


Code Block
languagejs
themeEmacs
titlesynapeditor.config.js
var synapEditorConfig = {
    ...
    'collaboration.config': { 
        'wsUrl': 'ws://websocket_url:1234',
        'docId': 'documentId' // 실시간 협업을 시작할 문서 Id 설정
    },
    ...
}



Code Block
languagejs
themeEmacs
titlesynapeditor.config.js
var editor = new SynapEditor(id, synapEditorConfig);
var collaboration = editor.plugins.collaboration;
 
collaboration.init();


...

configscript


Code Block
languagejs
themeEmacs
titlesynapeditor.config.js
var synapEditorConfig = {
    ...
    'collaboration.config': { 
        'wsUrl': 'ws://websocket_url:1234'
    },
    ...
}



Code Block
languagejs
themeEmacs
titlesynapeditor.config.js
var editor = new SynapEditor(id, synapEditorConfig);
var collaboration = editor.plugins.collaboration;
 
collaboration.changeDocument('documentId'); // 실시간 협업을 시작할 문서 Id 설정



destroy()를 사용하여 실시간 협업 종료하기

...