summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/blob/utils.js
blob: 840a3dbe4505441d5d17e4f69db5289dec213a38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import Editor from '~/editor/editor_lite';

export function initEditorLite({ el, blobPath, blobContent }) {
  if (!el) {
    throw new Error(`"el" parameter is required to initialize Editor`);
  }
  const editor = new Editor();
  editor.createInstance({
    el,
    blobPath,
    blobContent,
  });

  return editor;
}

export default () => ({});