debian-mirror-gitlab/app/assets/javascripts/blob/utils.js
2020-05-24 23:13:21 +05:30

18 lines
347 B
JavaScript

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 () => ({});