Skip to content
Snippets Groups Projects
Commit d5fd8d89 authored by chris's avatar chris
Browse files

disable eslint rul in file

parent d4d1ecac
No related branches found
No related tags found
1 merge request!144enable insertions, deletions on codeblock
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
}, },
"dependencies": { "dependencies": {
"prosemirror-schema-list": "^1.1.2", "prosemirror-schema-list": "^1.1.2",
"prosemirror-tables": "^1.1.0" "prosemirror-tables": "^1.1.0",
"wax-prosemirror-utilities": "0.0.13"
} }
} }
import { SchemaHelpers } from "wax-prosemirror-utilities"; /* eslint-disable camelcase */
import { SchemaHelpers } from 'wax-prosemirror-utilities';
const list_item = { const list_item = {
content: "paragraph block*", content: 'paragraph block*',
attrs: { attrs: {
track: { default: [] } track: { default: [] },
}, },
parseDOM: [ parseDOM: [
{ {
tag: "li", tag: 'li',
getAttrs(hook, next) { getAttrs(hook, next) {
Object.assign(hook, { Object.assign(hook, {
track: SchemaHelpers.parseTracks(hook.dom.dataset.track) track: SchemaHelpers.parseTracks(hook.dom.dataset.track),
}); });
next(); next();
} },
} },
], ],
toDOM(hook, next) { toDOM(hook, next) {
const attrs = {}; const attrs = {};
if (hook.node.attrs.track.length) { if (hook.node.attrs.track.length) {
attrs["data-track"] = JSON.stringify(hook.node.attrs.track); attrs['data-track'] = JSON.stringify(hook.node.attrs.track);
} }
hook.value = ["li", attrs, 0]; hook.value = ['li', attrs, 0];
next(); next();
}, },
defining: true defining: true,
}; };
export default list_item; export default list_item;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment