From 4e092ab6a3d5135cd8885735725a65531d2ecde0 Mon Sep 17 00:00:00 2001 From: chris <kokosias@yahoo.gr> Date: Wed, 23 Sep 2020 14:02:17 +0300 Subject: [PATCH] add new toolgroup --- .../DisplayText.js | 21 +++++++++++++++++++ .../DisplayTextToolGroupService.js | 10 +++++++++ 2 files changed, 31 insertions(+) create mode 100644 wax-prosemirror-services/src/WaxToolGroups/DisplayTextToolGroupService/DisplayText.js create mode 100644 wax-prosemirror-services/src/WaxToolGroups/DisplayTextToolGroupService/DisplayTextToolGroupService.js diff --git a/wax-prosemirror-services/src/WaxToolGroups/DisplayTextToolGroupService/DisplayText.js b/wax-prosemirror-services/src/WaxToolGroups/DisplayTextToolGroupService/DisplayText.js new file mode 100644 index 000000000..a0a7ddc11 --- /dev/null +++ b/wax-prosemirror-services/src/WaxToolGroups/DisplayTextToolGroupService/DisplayText.js @@ -0,0 +1,21 @@ +import React from 'react'; +import { injectable, inject } from 'inversify'; +import { LeftMenuTitle } from 'wax-prosemirror-components'; +import ToolGroup from '../../lib/ToolGroup'; + +@injectable() +class DisplayText extends ToolGroup { + tools = []; + toolGroups = []; + + constructor(@inject('Display') display, @inject('Text') text) { + super(); + this.toolGroups = [display, text]; + } + + renderTools(view) { + return <span>hi</span>; + } +} + +export default DisplayText; diff --git a/wax-prosemirror-services/src/WaxToolGroups/DisplayTextToolGroupService/DisplayTextToolGroupService.js b/wax-prosemirror-services/src/WaxToolGroups/DisplayTextToolGroupService/DisplayTextToolGroupService.js new file mode 100644 index 000000000..77996124e --- /dev/null +++ b/wax-prosemirror-services/src/WaxToolGroups/DisplayTextToolGroupService/DisplayTextToolGroupService.js @@ -0,0 +1,10 @@ +import Service from '../../Service'; +import DisplayText from './DisplayText'; + +class DisplayTextToolGroupService extends Service { + register() { + this.container.bind('DisplayText').to(DisplayText); + } +} + +export default DisplayTextToolGroupService; -- GitLab