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

add files

parent 4e149dfe
No related branches found
No related tags found
1 merge request!45Develop
const list_item = {
content: "block+",
attrs: {
track: { default: [] }
},
parseDOM: [
{
tag: "li",
getAttrs(hook, next) {
Object.assign(hook, {
track: parseTracks(hook.dom.dataset.track)
});
next();
}
}
],
toDOM(hook, next) {
const attrs = {};
if (hook.node.attrs.track.length) {
attrs["data-track"] = JSON.stringify(hook.node.attrs.track);
}
hook.value = ["li", attrs, 0];
next();
},
defining: true
};
export default list_item;
import { listItemNode } from "wax-prosemirror-schema";
import Service from "wax-prosemirror-core/src/services/Service";
class ListItemService extends Service {
boot() {}
register() {
this.container
.bind("schema")
.toConstantValue({ list_item: listItemNode })
.whenTargetNamed("node");
}
}
export default ListItemService;
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