debian-mirror-gitlab/app/assets/javascripts/blob/utils.js
2020-10-24 23:57:45 +05:30

20 lines
382 B
JavaScript

import Editor from '~/editor/editor_lite';
export function initEditorLite({ el, ...args }) {
if (!el) {
throw new Error(`"el" parameter is required to initialize Editor`);
}
const editor = new Editor({
scrollbar: {
alwaysConsumeMouseWheel: false,
},
});
editor.createInstance({
el,
...args,
});
return editor;
}
export default () => ({});