4
1

Editor.js 342 B

123456789101112131415
  1. setup.startEditor = (domId, text) =>{
  2. setup.externalCodePromise('ace').then(()=>{
  3. const editor = ace.edit(domId);
  4. editor.setOption("showInvisibles", true);
  5. editor.setTheme("ace/theme/chrome");
  6. editor.session.setMode("ace/mode/html");
  7. editor.session.setUseWorker(false);
  8. editor.setValue(text);
  9. setup.editor = editor;
  10. });
  11. }