Page tree

Versions Compared

Key

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

...

script로 설정 예시

Code Block
languagexmljs
themeEmacs
titleindex.html
linenumberstrue
// 에디터 초기화할 때 script를 추가하여 css를 적용
initEditor = () => {
   ...
   const paths = [
      'synapeditor.min.css의 url',
      'externalStyle.min.css의 url',
      'shapeEditor.min.css의 url',
      'webAccessibilityChecker.min.css의 url',
      'webSpellChecker.min.css의 url',
      'personalDataProtection.min.css의 url',
      'characterPicker.min.css의 url',
      'documentComparison.min.css의 url',
      'formEditor.min.css의 url',
      'forbiddenWordDetection.min.css의 url',
      'ocr.min.css의 url'
   ];
    
   const topDocument = window.top.document;
   paths.forEach(function (cssFile) {
      if (topDocument.querySelector(`[href='${cssFile}']`)) {
         return;
      }
    
      var link = topDocument.createElement('link');
      link.rel = 'stylesheet';
      link.href = cssFile;
      topDocument.head.appendChild(link);
   });
   ...
   window.editor = new SynapEditor(editorId, that.editorConfig, html, eventListener);
}

...