diff --git a/wax-prosemirror-schema/index.js b/wax-prosemirror-schema/index.js index 97ef23a30623b4e706f9840148a7d47b8a39cf7c..8bc81bfc46307e29097f1245fec91c5382ab0761 100644 --- a/wax-prosemirror-schema/index.js +++ b/wax-prosemirror-schema/index.js @@ -30,3 +30,4 @@ export { default as extractPoetryNode } from "./src/nodes/extractPoetryNode"; export { default as titleNode } from "./src/nodes/titleNode"; export { default as orderedListNode } from "./src/nodes/orderedListNode"; export { default as bulletListNode } from "./src/nodes/bulletListNode"; +export { default as listItemNode } from "./src/nodes/listItemNode"; diff --git a/wax-prosemirror-schema/src/editoria/nodes.js b/wax-prosemirror-schema/src/editoria/nodes.js index 749ed71362cb059c1afeb7ed3079b856a47dcf61..5e90ad55da62bfca83af500bf608977922964b21 100644 --- a/wax-prosemirror-schema/src/editoria/nodes.js +++ b/wax-prosemirror-schema/src/editoria/nodes.js @@ -325,30 +325,6 @@ const nodes = { return [`h${node.attrs.level}`, attrs, 0]; } }, - list_item: { - content: "block+", - attrs: { - track: { default: [] } - }, - parseDOM: [ - { - tag: "li", - getAttrs(dom) { - return { - track: parseTracks(dom.dataset.track) - }; - } - } - ], - toDOM(node) { - const attrs = {}; - if (node.attrs.track.length) { - attrs["data-track"] = JSON.stringify(node.attrs.track); - } - return ["li", attrs, 0]; - }, - defining: true - }, blockquote: { content: "block+", group: "block", diff --git a/wax-prosemirror-services/src/AnnotationService/Annotation.js b/wax-prosemirror-services/src/AnnotationService/Annotation.js index a8b0c1d9e1da1cb0bdd8d6d5d66bd39449d5aa0e..da9061d630227bfd4d5638c756d5a9690deed031 100644 --- a/wax-prosemirror-services/src/AnnotationService/Annotation.js +++ b/wax-prosemirror-services/src/AnnotationService/Annotation.js @@ -18,6 +18,8 @@ export default class Annotation extends ToolGroup { @inject("Image") image, @inject("OrderedList") orderedlist, @inject("BulletList") bulletlist, + @inject("JoinUp") joinup, + @inject("Lift") lift, @inject("Table") table, @inject("TableDropDownOptions") tableDropDownOptions ) { @@ -37,7 +39,9 @@ export default class Annotation extends ToolGroup { image, table, orderedlist, - bulletlist + bulletlist, + joinup, + lift ]; } diff --git a/wax-prosemirror-services/src/AnnotationService/tools/JoinUp.js b/wax-prosemirror-services/src/AnnotationService/tools/JoinUp.js deleted file mode 100644 index 0e5907bd1df9856bfab4e5e0c48945455deeddcc..0000000000000000000000000000000000000000 --- a/wax-prosemirror-services/src/AnnotationService/tools/JoinUp.js +++ /dev/null @@ -1,22 +0,0 @@ -import { joinUp } from "prosemirror-commands"; -import Tools from "../../lib/Tools"; -import { injectable } from "inversify"; -import { icons } from "wax-prosemirror-components"; - -@injectable() -export default class JoinUp extends Tools { - title = "Join with above block"; - content = icons.join_up; - - get run() { - return joinUp; - } - - get enable() { - return joinUp; - } - - select(state) { - return joinUp(state); - } -} diff --git a/wax-prosemirror-services/src/ListsService/index.js b/wax-prosemirror-services/src/ListsService/index.js index 47b0485da39c6b3298ef701e01c03b2550e956c2..628800e85c94764016a8c4bfb82c09d7b1177f0a 100644 --- a/wax-prosemirror-services/src/ListsService/index.js +++ b/wax-prosemirror-services/src/ListsService/index.js @@ -2,10 +2,12 @@ import BulletListService from "./BulletListService/BulletListService"; import OrderedListService from "./OrderedListService/OrderedListService"; import JoinUpService from "./JoinUpService/JoinUpService"; import LiftService from "./LiftService/LiftService"; +import ListItemService from "./ListItemService/ListItemService"; export default [ new BulletListService(), new OrderedListService(), new JoinUpService(), - new LiftService() + new LiftService(), + new ListItemService() ];