diff --git a/wax-prosemirror-services/src/WaxToolGroups/TableListGroupService/Table.js b/wax-prosemirror-services/src/WaxToolGroups/DisplayToolGroupService/Display.js similarity index 100% rename from wax-prosemirror-services/src/WaxToolGroups/TableListGroupService/Table.js rename to wax-prosemirror-services/src/WaxToolGroups/DisplayToolGroupService/Display.js diff --git a/wax-prosemirror-services/src/WaxToolGroups/DisplayToolGroupService/DisplayToolGroupService.js b/wax-prosemirror-services/src/WaxToolGroups/DisplayToolGroupService/DisplayToolGroupService.js new file mode 100644 index 0000000000000000000000000000000000000000..a2a4c84fdd282bf4524272955a1337dcf7a7cb8c --- /dev/null +++ b/wax-prosemirror-services/src/WaxToolGroups/DisplayToolGroupService/DisplayToolGroupService.js @@ -0,0 +1,12 @@ +import Display from "./Display"; +import Service from "wax-prosemirror-core/src/services/Service"; + +class DisplayToolGroupService extends Service { + name = "DisplayToolGroupService"; + + register() { + this.container.bind("Display").to(Display); + } +} + +export default DisplayToolGroupService; diff --git a/wax-prosemirror-services/src/WaxToolGroups/TableToolGroupService/Table.js b/wax-prosemirror-services/src/WaxToolGroups/TableToolGroupService/Table.js new file mode 100644 index 0000000000000000000000000000000000000000..92a7740763387faa1ccde82050d875cadcf260e1 --- /dev/null +++ b/wax-prosemirror-services/src/WaxToolGroups/TableToolGroupService/Table.js @@ -0,0 +1,26 @@ +import { injectable, inject } from "inversify"; +import ToolGroup from "../../lib/ToolGroup"; + +@injectable() +class Table extends ToolGroup { + tools = []; + constructor( + @inject("OrderedList") orderedlist, + @inject("BulletList") bulletlist, + @inject("JoinUp") joinup, + @inject("Lift") lift + ) { + super(); + this.tools = [orderedlist, bulletlist, joinup, lift]; + } + + renderTools(view) { + const tools = []; + this.tools.forEach(tool => { + tools.push(tool.renderTool(view)); + }); + return tools; + } +} + +export default Table; diff --git a/wax-prosemirror-services/src/WaxToolGroups/TableListGroupService/TableListGroupService.js b/wax-prosemirror-services/src/WaxToolGroups/TableToolGroupService/TableGroupService.js similarity index 100% rename from wax-prosemirror-services/src/WaxToolGroups/TableListGroupService/TableListGroupService.js rename to wax-prosemirror-services/src/WaxToolGroups/TableToolGroupService/TableGroupService.js diff --git a/wax-prosemirror-services/src/WaxToolGroups/TableToolGroupService/TableToolGroupService.js b/wax-prosemirror-services/src/WaxToolGroups/TableToolGroupService/TableToolGroupService.js new file mode 100644 index 0000000000000000000000000000000000000000..137ed227b0b53ecd863d52f28e2f5574c4be44c9 --- /dev/null +++ b/wax-prosemirror-services/src/WaxToolGroups/TableToolGroupService/TableToolGroupService.js @@ -0,0 +1,12 @@ +import Table from "./Table"; +import Service from "wax-prosemirror-core/src/services/Service"; + +class TableToolGroupService extends Service { + name = "TableToolGroupService"; + + register() { + this.container.bind("Table").to(Table); + } +} + +export default TableToolGroupService; diff --git a/wax-prosemirror-services/src/WaxToolGroups/TextToolGroupService/Text.js b/wax-prosemirror-services/src/WaxToolGroups/TextToolGroupService/Text.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/wax-prosemirror-services/src/WaxToolGroups/TextToolGroupService/TextToolGroupService.js b/wax-prosemirror-services/src/WaxToolGroups/TextToolGroupService/TextToolGroupService.js new file mode 100644 index 0000000000000000000000000000000000000000..80f34a2fc2f9660e8bbf32ab30a85b0f2118f18d --- /dev/null +++ b/wax-prosemirror-services/src/WaxToolGroups/TextToolGroupService/TextToolGroupService.js @@ -0,0 +1,12 @@ +import Text from "./Text"; +import Service from "wax-prosemirror-core/src/services/Service"; + +class TextToolGroupService extends Service { + name = "TextToolGroupService"; + + register() { + this.container.bind("Text").to(Text); + } +} + +export default TextToolGroupService;