Iframe mode를 설정하면 편집영역이 iframe 안쪽에 생성되어 외부 스타일의 영향을 최소화 할 수 있습니다.
설정방법
synapeditor.config.js
'editor.mode.iframe': { 'enable': true, 'style.urls': ['../dist/iframeMode/contentsEditStyle.css', ... ], 'script.urls': ['../dist/iframeMode/SEPolyfill.js'] }
enable : iframe mode 설정 여부
style.urls : iframe 내부에 추가할 스타일 url ( 'contentsEditStyle.css': iframe mode를 설정하려면 반드시 추가되야 합니다. )
script.urls : iframe 내부에 추가할 스크립트 url ( 'SEPolyfill.js': iframe mode를 설정하려면 반드시 추가되야 합니다. )
주의사항
Iframe mode 사용시 에디터가 완전히 초기화된 후 에디터 API를 사용하셔야 합니다.
openHTML() 사용예
체험하기
>> Iframe mode 체험하기