Passed
Push — master ( a7681e...7a9f0a )
by Michael
02:37
created

T_IMPORT   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 1
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 0
nc 1
dl 0
loc 1
rs 10
c 0
b 0
f 0
wmc 2
mnd 0
bc 2
fnc 2
bpm 1
cpm 1
noi 0
1
import { Plugin } from 'prosemirror-state';
2
import MenuView from './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
export default MenuPlugin;
15