diff --git a/editors/demo/src/Editoria/config/config.js b/editors/demo/src/Editoria/config/config.js index a25c7aef4e8671e0094b331e7425130e7aeba87e..49ed46a92004b1d7891dcd3f33665b67ce27bf97 100644 --- a/editors/demo/src/Editoria/config/config.js +++ b/editors/demo/src/Editoria/config/config.js @@ -26,8 +26,6 @@ import { TransformService, TrackOptionsToolGroupService, TrackCommentOptionsToolGroupService, - CustomTagInlineToolGroupService, - CustomTagBlockToolGroupService, CustomTagService, disallowPasteImagesPlugin, // YjsService, @@ -217,7 +215,5 @@ export default { new TransformService(), new TrackOptionsToolGroupService(), new TrackCommentOptionsToolGroupService(), - new CustomTagInlineToolGroupService(), - new CustomTagBlockToolGroupService(), ], }; diff --git a/editors/demo/src/Editoria/config/configMobile.js b/editors/demo/src/Editoria/config/configMobile.js index c4af444123436e6f6fe2d8893c3bc6522f3b343b..57bf2c4005b0708d28103331cde2759b7210a977 100644 --- a/editors/demo/src/Editoria/config/configMobile.js +++ b/editors/demo/src/Editoria/config/configMobile.js @@ -18,8 +18,6 @@ import { EditorInfoToolGroupServices, BottomInfoService, TransformService, - CustomTagInlineToolGroupService, - CustomTagBlockToolGroupService, CustomTagService, } from 'wax-prosemirror-services'; @@ -101,7 +99,5 @@ export default { new BottomInfoService(), new TransformService(), new CustomTagService(), - new CustomTagInlineToolGroupService(), - new CustomTagBlockToolGroupService(), ], }; diff --git a/editors/demo/src/OEN/config/config.js b/editors/demo/src/OEN/config/config.js index 7d0aa46110d979f6f12c0f95d98e4cb6c9d4c485..e751bfb3fe6a1ce8ff550dca3eb09de5981e28b0 100644 --- a/editors/demo/src/OEN/config/config.js +++ b/editors/demo/src/OEN/config/config.js @@ -26,8 +26,6 @@ import { TransformService, TrackOptionsToolGroupService, TrackCommentOptionsToolGroupService, - CustomTagInlineToolGroupService, - CustomTagBlockToolGroupService, CustomTagService, OENContainersService, } from 'wax-prosemirror-services'; @@ -215,7 +213,5 @@ export default { new TransformService(), new TrackOptionsToolGroupService(), new TrackCommentOptionsToolGroupService(), - new CustomTagInlineToolGroupService(), - new CustomTagBlockToolGroupService(), ], }; diff --git a/wax-prosemirror-services/index.js b/wax-prosemirror-services/index.js index de8b69377b12cf30e405b9c491e4be30d3e4495b..be0dd3bb9c18364770bb50f2d31daf6af5893834 100644 --- a/wax-prosemirror-services/index.js +++ b/wax-prosemirror-services/index.js @@ -41,8 +41,6 @@ export { default as TrackingAndEditingToolGroupService } from './src/WaxToolGrou export { default as EditorInfoToolGroupServices } from './src/WaxToolGroups/BottomToolGroupService/InfoToolGroupService/EditorInfoToolGroupService'; export { default as TrackOptionsToolGroupService } from './src/WaxToolGroups/TrackOptionsToolGroupService/TrackOptionsToolGroupService'; export { default as TrackCommentOptionsToolGroupService } from './src/WaxToolGroups/TrackCommentOptionsToolGroupService/TrackCommentOptionsToolGroupService'; -export { default as CustomTagInlineToolGroupService } from './src/WaxToolGroups/CustomTagToolGroupService/CustomTagInlineToolGroupService/CustomTagInlineToolGroupService'; -export { default as CustomTagBlockToolGroupService } from './src/WaxToolGroups/CustomTagToolGroupService/CustomTagBlockToolGroupService/CustomTagBlockToolGroupService'; /* Plugins */ export { default as disallowPasteImagesPlugin } from './src/ImageService/plugins/disallowPasteImagesPlugin'; diff --git a/wax-prosemirror-services/src/BottomInfoService/InfoToolGroupService/EditorInfoToolGroupService.js b/wax-prosemirror-services/src/BottomInfoService/InfoToolGroupService/EditorInfoToolGroupService.js new file mode 100644 index 0000000000000000000000000000000000000000..d67eaf8356320af3c92d8b09683191646fb48b65 --- /dev/null +++ b/wax-prosemirror-services/src/BottomInfoService/InfoToolGroupService/EditorInfoToolGroupService.js @@ -0,0 +1,10 @@ +import { Service } from 'wax-prosemirror-core'; +import InfoToolGroup from './InfoTool'; + +class EditorInfoToolGroupService extends Service { + name = 'EditorInfoToolGroupService'; + register() { + this.container.bind('InfoToolGroup').to(InfoToolGroup); + } +} +export default EditorInfoToolGroupService; diff --git a/wax-prosemirror-services/src/BottomInfoService/InfoToolGroupService/InfoTool.js b/wax-prosemirror-services/src/BottomInfoService/InfoToolGroupService/InfoTool.js new file mode 100644 index 0000000000000000000000000000000000000000..8d8ce2d97d7f0277b738f7ac778a62cfceca926b --- /dev/null +++ b/wax-prosemirror-services/src/BottomInfoService/InfoToolGroupService/InfoTool.js @@ -0,0 +1,16 @@ +import { injectable, inject } from 'inversify'; +import { ToolGroup } from 'wax-prosemirror-core'; + +@injectable() +class InfoToolGroup extends ToolGroup { + tools = []; + constructor( + @inject('CounterInfoTool') counterinfotool, + @inject('ShortCutsInfoTool') shortcutsinfotool, + ) { + super(); + this.tools = [shortcutsinfotool, counterinfotool]; + } +} + +export default InfoToolGroup; diff --git a/wax-prosemirror-services/src/WaxToolGroups/CustomTagToolGroupService/CustomTagBlockToolGroupService/CustomTagBlockToolGroup.js b/wax-prosemirror-services/src/CustomTagService/CustomTagToolGroupService/CustomTagBlockToolGroupService/CustomTagBlockToolGroup.js similarity index 100% rename from wax-prosemirror-services/src/WaxToolGroups/CustomTagToolGroupService/CustomTagBlockToolGroupService/CustomTagBlockToolGroup.js rename to wax-prosemirror-services/src/CustomTagService/CustomTagToolGroupService/CustomTagBlockToolGroupService/CustomTagBlockToolGroup.js diff --git a/wax-prosemirror-services/src/WaxToolGroups/CustomTagToolGroupService/CustomTagBlockToolGroupService/CustomTagBlockToolGroupService.js b/wax-prosemirror-services/src/CustomTagService/CustomTagToolGroupService/CustomTagBlockToolGroupService/CustomTagBlockToolGroupService.js similarity index 100% rename from wax-prosemirror-services/src/WaxToolGroups/CustomTagToolGroupService/CustomTagBlockToolGroupService/CustomTagBlockToolGroupService.js rename to wax-prosemirror-services/src/CustomTagService/CustomTagToolGroupService/CustomTagBlockToolGroupService/CustomTagBlockToolGroupService.js diff --git a/wax-prosemirror-services/src/WaxToolGroups/CustomTagToolGroupService/CustomTagInlineToolGroupService/CustomTagInlineToolGroup.js b/wax-prosemirror-services/src/CustomTagService/CustomTagToolGroupService/CustomTagInlineToolGroupService/CustomTagInlineToolGroup.js similarity index 100% rename from wax-prosemirror-services/src/WaxToolGroups/CustomTagToolGroupService/CustomTagInlineToolGroupService/CustomTagInlineToolGroup.js rename to wax-prosemirror-services/src/CustomTagService/CustomTagToolGroupService/CustomTagInlineToolGroupService/CustomTagInlineToolGroup.js diff --git a/wax-prosemirror-services/src/WaxToolGroups/CustomTagToolGroupService/CustomTagInlineToolGroupService/CustomTagInlineToolGroupService.js b/wax-prosemirror-services/src/CustomTagService/CustomTagToolGroupService/CustomTagInlineToolGroupService/CustomTagInlineToolGroupService.js similarity index 100% rename from wax-prosemirror-services/src/WaxToolGroups/CustomTagToolGroupService/CustomTagInlineToolGroupService/CustomTagInlineToolGroupService.js rename to wax-prosemirror-services/src/CustomTagService/CustomTagToolGroupService/CustomTagInlineToolGroupService/CustomTagInlineToolGroupService.js diff --git a/wax-prosemirror-services/src/CustomTagService/index.js b/wax-prosemirror-services/src/CustomTagService/index.js index 9be43edbd63afd8bb3494470420268f18637074d..adb4bd0d2b83dcbe07e535dd7a06f17c797be520 100644 --- a/wax-prosemirror-services/src/CustomTagService/index.js +++ b/wax-prosemirror-services/src/CustomTagService/index.js @@ -1,4 +1,11 @@ import CustomTagBlockService from './CustomTagBlockService/CustomTagBlockService'; import CustomTagInlineService from './CustomTagInlineService/CustomTagInlineService'; +import CustomTagBlockToolGroupService from './CustomTagToolGroupService/CustomTagBlockToolGroupService/CustomTagBlockToolGroupService'; +import CustomTagInlineToolGroupService from './CustomTagToolGroupService/CustomTagInlineToolGroupService/CustomTagInlineToolGroupService'; -export default [new CustomTagBlockService(), new CustomTagInlineService()]; +export default [ + new CustomTagBlockService(), + new CustomTagInlineService(), + new CustomTagBlockToolGroupService(), + new CustomTagInlineToolGroupService(), +];