Completed
Branch master (28f58d)
by Michael
02:42
created

T_CONST ➔ ... ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 1
rs 10
1
const { Plugin } = require('prosemirror-state');
2
const { MenuView } = require('./MenuView');
3
4
function MenuPlugin(items) {
5
    return new Plugin({
6
        view(editorView) {
7
            const menuView = new MenuView(items, editorView);
8
            editorView.dom.parentNode.insertBefore(menuView.dom, editorView.dom);
9
            return menuView;
10
        },
11
    });
12
}
13
14
exports.MenuPlugin = MenuPlugin;
15