import { useEffect } from 'react';
import SynapEditor from '../editors/synapeditor/synapeditor.min';
import '../editors/synapeditor/synapeditor.min.css';
function SynapEditorComponent({ editorId }) {
useEffect(() => {
console.log();
const config = {
'editor.license': { }, // 라이센스 설정
'editor.size.width': '800px',
'editor.size.height': '500px'
};
const html = '';
const eventListener = {
initialized: () => {
console.log('에디터 초기화 완료');
}
};
new SynapEditor('synapeditor'editorId, config, html, eventListener);
}, [editorId]);
return (
<div id="synapeditor"{editorId}></div>
);
} |