Skip to content
Snippets Groups Projects
Commit 6a9e578b authored by Christos's avatar Christos
Browse files

Merge branch 'move-toolGroups' into 'master'

Move tool groups

See merge request !519
parents 9410921e be6727d1
No related branches found
No related tags found
1 merge request!519Move tool groups
Pipeline #56093 passed with stages
in 3 minutes and 22 seconds
Showing
with 33 additions and 179 deletions
...@@ -3,49 +3,30 @@ import { debounce } from 'lodash'; ...@@ -3,49 +3,30 @@ import { debounce } from 'lodash';
import { import {
InlineAnnotationsService, InlineAnnotationsService,
AnnotationToolGroupService,
ImageService, ImageService,
ImageToolGroupService,
LinkService, LinkService,
ListsService, ListsService,
ListToolGroupService,
BaseService, BaseService,
BaseToolGroupService,
DisplayBlockLevelService, DisplayBlockLevelService,
DisplayToolGroupService,
TextBlockLevelService, TextBlockLevelService,
TextToolGroupService,
NoteService, NoteService,
NoteToolGroupService,
TrackChangeService, TrackChangeService,
CommentsService, CommentsService,
CodeBlockService, CodeBlockService,
CodeBlockToolGroupService,
DisplayTextToolGroupService, DisplayTextToolGroupService,
MathService, MathService,
FindAndReplaceService, FindAndReplaceService,
EditingSuggestingService, EditingSuggestingService,
TrackingAndEditingToolGroupService,
FullScreenService, FullScreenService,
FullScreenToolGroupService,
SpecialCharactersService, SpecialCharactersService,
SpecialCharactersToolGroupService,
HighlightService, HighlightService,
TextHighlightToolGroupServices,
EditorInfoToolGroupServices,
BottomInfoService, BottomInfoService,
TransformService, TransformService,
TransformToolGroupService,
TrackOptionsToolGroupService,
TrackCommentOptionsToolGroupService,
CustomTagInlineToolGroupService,
CustomTagBlockToolGroupService,
CustomTagService, CustomTagService,
disallowPasteImagesPlugin, disallowPasteImagesPlugin,
// YjsService,
BlockDropDownToolGroupService, BlockDropDownToolGroupService,
// TitleToolGroupService,
AskAiContentService, AskAiContentService,
// YjsService,
} from 'wax-prosemirror-services'; } from 'wax-prosemirror-services';
import { TablesService, tableEditing, columnResizing } from 'wax-table-service'; import { TablesService, tableEditing, columnResizing } from 'wax-table-service';
...@@ -179,7 +160,7 @@ export default { ...@@ -179,7 +160,7 @@ export default {
], ],
ImageService: { showAlt: true }, ImageService: { showAlt: true },
CommentsService: { CommentsService: {
showTitle: true showTitle: true,
}, },
CustomTagService: { CustomTagService: {
tags: [ tags: [
...@@ -201,15 +182,12 @@ export default { ...@@ -201,15 +182,12 @@ export default {
}, },
services: [ services: [
// new TitleToolGroupService(),
// new YjsService(), // new YjsService(),
new BlockDropDownToolGroupService(), new BlockDropDownToolGroupService(),
new AskAiContentService(), new AskAiContentService(),
new CustomTagService(), new CustomTagService(),
new DisplayBlockLevelService(), new DisplayBlockLevelService(),
new DisplayToolGroupService(),
new TextBlockLevelService(), new TextBlockLevelService(),
new TextToolGroupService(),
new ListsService(), new ListsService(),
new LinkService(), new LinkService(),
new InlineAnnotationsService(), new InlineAnnotationsService(),
...@@ -218,32 +196,16 @@ export default { ...@@ -218,32 +196,16 @@ export default {
new ImageService(), new ImageService(),
new TablesService(), new TablesService(),
new BaseService(), new BaseService(),
new BaseToolGroupService(),
new NoteService(), new NoteService(),
new ImageToolGroupService(),
new AnnotationToolGroupService(),
new NoteToolGroupService(),
new ListToolGroupService(),
new CodeBlockService(), new CodeBlockService(),
new CodeBlockToolGroupService(),
new EditingSuggestingService(), new EditingSuggestingService(),
new DisplayTextToolGroupService(), new DisplayTextToolGroupService(),
new MathService(), new MathService(),
new FindAndReplaceService(), new FindAndReplaceService(),
new TrackingAndEditingToolGroupService(),
new FullScreenService(), new FullScreenService(),
new FullScreenToolGroupService(),
new SpecialCharactersService(), new SpecialCharactersService(),
new SpecialCharactersToolGroupService(),
new HighlightService(), new HighlightService(),
new TextHighlightToolGroupServices(),
new EditorInfoToolGroupServices(),
new BottomInfoService(), new BottomInfoService(),
new TransformService(), new TransformService(),
new TransformToolGroupService(),
new TrackOptionsToolGroupService(),
new TrackCommentOptionsToolGroupService(),
new CustomTagInlineToolGroupService(),
new CustomTagBlockToolGroupService(),
], ],
}; };
import { emDash, ellipsis } from 'prosemirror-inputrules'; import { emDash, ellipsis } from 'prosemirror-inputrules';
import { import {
AnnotationToolGroupService,
ImageService, ImageService,
InlineAnnotationsService, InlineAnnotationsService,
LinkService, LinkService,
ListsService, ListsService,
ListToolGroupService,
BaseService, BaseService,
BaseToolGroupService,
DisplayBlockLevelService, DisplayBlockLevelService,
DisplayToolGroupService,
ImageToolGroupService,
TextBlockLevelService, TextBlockLevelService,
TextToolGroupService,
NoteService, NoteService,
NoteToolGroupService,
EditingSuggestingService, EditingSuggestingService,
TrackChangeService, TrackChangeService,
CommentsService, CommentsService,
CodeBlockService, CodeBlockService,
CodeBlockToolGroupService,
DisplayTextToolGroupService, DisplayTextToolGroupService,
BlockDropDownToolGroupService, BlockDropDownToolGroupService,
HighlightService, HighlightService,
TextHighlightToolGroupServices,
EditorInfoToolGroupServices,
BottomInfoService, BottomInfoService,
TransformService, TransformService,
TransformToolGroupService,
CustomTagInlineToolGroupService,
CustomTagBlockToolGroupService,
CustomTagService, CustomTagService,
} from 'wax-prosemirror-services'; } from 'wax-prosemirror-services';
...@@ -92,9 +79,7 @@ export default { ...@@ -92,9 +79,7 @@ export default {
//as it matters on how PM treats nodes and marks //as it matters on how PM treats nodes and marks
services: [ services: [
new DisplayBlockLevelService(), new DisplayBlockLevelService(),
new DisplayToolGroupService(),
new TextBlockLevelService(), new TextBlockLevelService(),
new TextToolGroupService(),
new ListsService(), new ListsService(),
new LinkService(), new LinkService(),
new InlineAnnotationsService(), new InlineAnnotationsService(),
...@@ -103,25 +88,14 @@ export default { ...@@ -103,25 +88,14 @@ export default {
new ImageService(), new ImageService(),
new TablesService(), new TablesService(),
new BaseService(), new BaseService(),
new BaseToolGroupService(),
new NoteService(), new NoteService(),
new ImageToolGroupService(),
new AnnotationToolGroupService(),
new NoteToolGroupService(),
new ListToolGroupService(),
new CodeBlockService(), new CodeBlockService(),
new CodeBlockToolGroupService(),
new EditingSuggestingService(), new EditingSuggestingService(),
new DisplayTextToolGroupService(), new DisplayTextToolGroupService(),
new BlockDropDownToolGroupService(), new BlockDropDownToolGroupService(),
new HighlightService(), new HighlightService(),
new TextHighlightToolGroupServices(),
new EditorInfoToolGroupServices(),
new BottomInfoService(), new BottomInfoService(),
new TransformService(), new TransformService(),
new TransformToolGroupService(),
new CustomTagService(), new CustomTagService(),
new CustomTagInlineToolGroupService(),
new CustomTagBlockToolGroupService(),
], ],
}; };
...@@ -195,7 +195,7 @@ const Hhmi = () => { ...@@ -195,7 +195,7 @@ const Hhmi = () => {
// targetFormat="JSON" // targetFormat="JSON"
readonly={readOnly} readonly={readOnly}
layout={HhmiLayout} layout={HhmiLayout}
onChange={source => console.log(source)} // onChange={source => console.log(source)}
/> />
</> </>
); );
......
import { emDash, ellipsis } from 'prosemirror-inputrules'; import { emDash, ellipsis } from 'prosemirror-inputrules';
import { import {
InlineAnnotationsService, InlineAnnotationsService,
AnnotationToolGroupService,
ImageService, ImageService,
ImageToolGroupService,
LinkService, LinkService,
ListsService, ListsService,
ListToolGroupService,
BaseService, BaseService,
BaseToolGroupService,
DisplayTextToolGroupService, DisplayTextToolGroupService,
MathService, MathService,
FullScreenService, FullScreenService,
FullScreenToolGroupService,
} from 'wax-prosemirror-services'; } from 'wax-prosemirror-services';
import { QuestionsService } from 'wax-questions-service'; import { QuestionsService } from 'wax-questions-service';
...@@ -68,13 +63,8 @@ export default { ...@@ -68,13 +63,8 @@ export default {
new ImageService(), new ImageService(),
new TablesService(), new TablesService(),
new BaseService(), new BaseService(),
new BaseToolGroupService(),
new ImageToolGroupService(),
new AnnotationToolGroupService(),
new ListToolGroupService(),
new DisplayTextToolGroupService(), new DisplayTextToolGroupService(),
new MathService(), new MathService(),
new FullScreenService(), new FullScreenService(),
new FullScreenToolGroupService(),
], ],
}; };
import { DefaultSchema } from 'wax-prosemirror-core'; import { DefaultSchema } from 'wax-prosemirror-core';
import { import {
InlineAnnotationsService, InlineAnnotationsService,
AnnotationToolGroupService,
ListsService, ListsService,
ListToolGroupService,
BaseService, BaseService,
BaseToolGroupService,
LinkService, LinkService,
EnterService, EnterService,
} from 'wax-prosemirror-services'; } from 'wax-prosemirror-services';
...@@ -48,12 +45,9 @@ const configEnter = getContent => ({ ...@@ -48,12 +45,9 @@ const configEnter = getContent => ({
services: [ services: [
new EnterService(), new EnterService(),
new InlineAnnotationsService(), new InlineAnnotationsService(),
new AnnotationToolGroupService(),
new LinkService(), new LinkService(),
new ListToolGroupService(),
new BaseService(), new BaseService(),
new ListsService(), new ListsService(),
new BaseToolGroupService(),
], ],
}); });
......
import { DefaultSchema } from 'wax-prosemirror-core'; import { DefaultSchema } from 'wax-prosemirror-core';
import { import {
InlineAnnotationsService, InlineAnnotationsService,
AnnotationToolGroupService,
ListsService, ListsService,
ListToolGroupService,
BaseService, BaseService,
BaseToolGroupService,
LinkService, LinkService,
} from 'wax-prosemirror-services'; } from 'wax-prosemirror-services';
...@@ -32,12 +29,9 @@ const config = { ...@@ -32,12 +29,9 @@ const config = {
services: [ services: [
new InlineAnnotationsService(), new InlineAnnotationsService(),
new AnnotationToolGroupService(),
new LinkService(), new LinkService(),
new ListToolGroupService(),
new BaseService(), new BaseService(),
new ListsService(), new ListsService(),
new BaseToolGroupService(),
], ],
}; };
......
import { import {
InlineAnnotationsService, InlineAnnotationsService,
AnnotationToolGroupService,
BaseService, BaseService,
BaseToolGroupService,
LinkService, LinkService,
} from 'wax-prosemirror-services'; } from 'wax-prosemirror-services';
...@@ -58,10 +56,8 @@ const configTitle = { ...@@ -58,10 +56,8 @@ const configTitle = {
services: [ services: [
new InlineAnnotationsService(), new InlineAnnotationsService(),
new AnnotationToolGroupService(),
new LinkService(), new LinkService(),
new BaseService(), new BaseService(),
new BaseToolGroupService(),
], ],
}; };
......
...@@ -3,48 +3,27 @@ import { debounce } from 'lodash'; ...@@ -3,48 +3,27 @@ import { debounce } from 'lodash';
import { import {
InlineAnnotationsService, InlineAnnotationsService,
AnnotationToolGroupService,
ImageService, ImageService,
ImageToolGroupService,
LinkService, LinkService,
ListsService, ListsService,
ListToolGroupService,
BaseService, BaseService,
BaseToolGroupService,
DisplayBlockLevelService, DisplayBlockLevelService,
DisplayToolGroupService,
TextBlockLevelService, TextBlockLevelService,
TextToolGroupService,
NoteService, NoteService,
NoteToolGroupService,
TrackChangeService, TrackChangeService,
CommentsService, CommentsService,
CodeBlockService, CodeBlockService,
CodeBlockToolGroupService,
// DisplayTextToolGroupService, // DisplayTextToolGroupService,
MathService, MathService,
FindAndReplaceService, FindAndReplaceService,
EditingSuggestingService, EditingSuggestingService,
TrackingAndEditingToolGroupService,
FullScreenService, FullScreenService,
FullScreenToolGroupService,
SpecialCharactersService, SpecialCharactersService,
SpecialCharactersToolGroupService,
HighlightService, HighlightService,
TextHighlightToolGroupServices,
EditorInfoToolGroupServices,
BottomInfoService, BottomInfoService,
TransformService, TransformService,
TransformToolGroupService,
TrackOptionsToolGroupService,
TrackCommentOptionsToolGroupService,
CustomTagInlineToolGroupService,
CustomTagBlockToolGroupService,
CustomTagService, CustomTagService,
OENContainersService, OENContainersService,
OENLeftToolGroupService,
OENContainersToolGroupService,
OENAsideToolGroupService,
} from 'wax-prosemirror-services'; } from 'wax-prosemirror-services';
import { TablesService, tableEditing, columnResizing } from 'wax-table-service'; import { TablesService, tableEditing, columnResizing } from 'wax-table-service';
...@@ -203,14 +182,10 @@ export default { ...@@ -203,14 +182,10 @@ export default {
}, },
services: [ services: [
new OENContainersToolGroupService(),
new OENContainersService(), new OENContainersService(),
new OENLeftToolGroupService(),
new CustomTagService(), new CustomTagService(),
new DisplayBlockLevelService(), new DisplayBlockLevelService(),
new DisplayToolGroupService(),
new TextBlockLevelService(), new TextBlockLevelService(),
new TextToolGroupService(),
new ListsService(), new ListsService(),
new LinkService(), new LinkService(),
new InlineAnnotationsService(), new InlineAnnotationsService(),
...@@ -219,32 +194,16 @@ export default { ...@@ -219,32 +194,16 @@ export default {
new ImageService(), new ImageService(),
new TablesService(), new TablesService(),
new BaseService(), new BaseService(),
new BaseToolGroupService(),
new NoteService(), new NoteService(),
new ImageToolGroupService(),
new AnnotationToolGroupService(),
new NoteToolGroupService(),
new ListToolGroupService(),
new CodeBlockService(), new CodeBlockService(),
new CodeBlockToolGroupService(),
new EditingSuggestingService(), new EditingSuggestingService(),
// new DisplayTextToolGroupService(), // new DisplayTextToolGroupService(),
new MathService(), new MathService(),
new FindAndReplaceService(), new FindAndReplaceService(),
new TrackingAndEditingToolGroupService(),
new FullScreenService(), new FullScreenService(),
new FullScreenToolGroupService(),
new SpecialCharactersService(), new SpecialCharactersService(),
new SpecialCharactersToolGroupService(),
new HighlightService(), new HighlightService(),
new TextHighlightToolGroupServices(),
new EditorInfoToolGroupServices(),
new BottomInfoService(), new BottomInfoService(),
new TransformService(), new TransformService(),
new TransformToolGroupService(),
new TrackOptionsToolGroupService(),
new TrackCommentOptionsToolGroupService(),
new CustomTagInlineToolGroupService(),
new CustomTagBlockToolGroupService(),
], ],
}; };
...@@ -18,7 +18,6 @@ export { default as EditoriaSchema } from './src/utilities/schema/EditoriaSchema ...@@ -18,7 +18,6 @@ export { default as EditoriaSchema } from './src/utilities/schema/EditoriaSchema
export { default as Middleware } from './src/utilities/lib/Middleware'; export { default as Middleware } from './src/utilities/lib/Middleware';
export { default as ToolGroup } from './src/utilities/lib/ToolGroup'; export { default as ToolGroup } from './src/utilities/lib/ToolGroup';
export { default as Tools } from './src/utilities/lib/Tools'; export { default as Tools } from './src/utilities/lib/Tools';
export { default as Translation } from './src/helpers/Translation';
/* Base Services */ /* Base Services */
export { default as LayoutService } from './src/config/defaultServices/LayoutService/LayoutService'; export { default as LayoutService } from './src/config/defaultServices/LayoutService/LayoutService';
...@@ -52,3 +51,8 @@ export { default as Button } from './src/components/Button'; ...@@ -52,3 +51,8 @@ export { default as Button } from './src/components/Button';
/* Plugins */ /* Plugins */
export { default as FakeCursorPlugin } from './src/config/plugins/FakeCursorPlugin'; export { default as FakeCursorPlugin } from './src/config/plugins/FakeCursorPlugin';
// export * from 'prosemirror-state';
// export * from 'prosemirror-view';
// export * from 'prosemirror-model';
// export * from 'prosemirror-transform';
...@@ -59,13 +59,13 @@ const backSpaceShortCut = (state, dispatch, view) => { ...@@ -59,13 +59,13 @@ const backSpaceShortCut = (state, dispatch, view) => {
}; };
const pressEnter = (state, dispatch) => { const pressEnter = (state, dispatch) => {
const { $from, to, from } = state.selection;
// Images // Images
if (state.selection.$head.parent.type.name === 'figcaption') { if (state.doc.resolve(from).parent.type.name === 'figcaption') {
return true; return true;
} }
if (state.selection.node && state.selection.node.type.name === 'image') { if (state.selection.node && state.selection.node.type.name === 'image') {
const { $from, to } = state.selection;
const same = $from.sharedDepth(to); const same = $from.sharedDepth(to);
const pos = $from.before(same); const pos = $from.before(same);
...@@ -88,8 +88,8 @@ const pressEnter = (state, dispatch) => { ...@@ -88,8 +88,8 @@ const pressEnter = (state, dispatch) => {
if ( if (
title.length === 1 && title.length === 1 &&
state.selection.from > title[0].pos + 1 && from > title[0].pos + 1 &&
state.selection.from < title[0].pos + title[0].node.nodeSize - 1 from < title[0].pos + title[0].node.nodeSize - 1
) { ) {
return true; return true;
} }
......
/* eslint-disable react/prop-types */
import React from 'react';
import { isEmpty } from 'lodash';
import { useTranslation } from 'react-i18next';
const Translation = ({ label, defaultTr }) => {
console.log('asdads', defaultTr);
const { t, i18n } = useTranslation();
return <>{!isEmpty(i18n) && i18n.exists(label) ? t(label) : defaultTr}</>;
};
export default Translation;
...@@ -19,7 +19,6 @@ export { default as SpecialCharactersService } from './src/SpecialCharactersServ ...@@ -19,7 +19,6 @@ export { default as SpecialCharactersService } from './src/SpecialCharactersServ
export { default as HighlightService } from './src/HighlightService/HightlightService'; export { default as HighlightService } from './src/HighlightService/HightlightService';
export { default as CounterInfoService } from './src/BottomInfoService/CounterInfoService/CounterInfoService'; export { default as CounterInfoService } from './src/BottomInfoService/CounterInfoService/CounterInfoService';
export { default as ShortCutsInfoService } from './src/BottomInfoService/ShortCutsInfoService/ShortCutsInfoService'; export { default as ShortCutsInfoService } from './src/BottomInfoService/ShortCutsInfoService/ShortCutsInfoService';
export { default as BottomInfoService } from './src/BottomInfoService/BottomInfoService'; export { default as BottomInfoService } from './src/BottomInfoService/BottomInfoService';
export { default as TransformService } from './src/TransformService/TransformService'; export { default as TransformService } from './src/TransformService/TransformService';
export { default as EditingSuggestingService } from './src/EditingSuggestingService/EditingSuggestingService'; export { default as EditingSuggestingService } from './src/EditingSuggestingService/EditingSuggestingService';
...@@ -32,32 +31,12 @@ export { default as OENContainersService } from './src/OENContainersService/OENC ...@@ -32,32 +31,12 @@ export { default as OENContainersService } from './src/OENContainersService/OENC
export { default as YjsService } from './src/YjsService/YjsService'; export { default as YjsService } from './src/YjsService/YjsService';
export { default as ExternalAPIContentService } from './src/ExternalAPIContentService/ExternalAPIContentService'; export { default as ExternalAPIContentService } from './src/ExternalAPIContentService/ExternalAPIContentService';
export { default as AskAiContentService } from './src/AiService/AskAiContentService'; export { default as AskAiContentService } from './src/AiService/AskAiContentService';
/* /*
ToolGroups ToolGroups
*/ */
export { default as BaseToolGroupService } from './src/WaxToolGroups/BaseToolGroupService/BaseToolGroupService';
export { default as AnnotationToolGroupService } from './src/WaxToolGroups/AnnotationToolGroupService/AnnotationToolGroupService';
export { default as ListToolGroupService } from './src/WaxToolGroups/ListToolGroupService/ListToolGroupService';
export { default as ImageToolGroupService } from './src/WaxToolGroups/ImageToolGroupService/ImageToolGroupService';
export { default as DisplayToolGroupService } from './src/WaxToolGroups/DisplayToolGroupService/DisplayToolGroupService';
export { default as TextToolGroupService } from './src/WaxToolGroups/TextToolGroupService/TextToolGroupService';
export { default as NoteToolGroupService } from './src/WaxToolGroups/NoteToolGroupService/NoteToolGroupService';
export { default as CodeBlockToolGroupService } from './src/WaxToolGroups/CodeBlockToolGroupService/CodeBlockToolGroupService';
export { default as DisplayTextToolGroupService } from './src/WaxToolGroups/DisplayTextToolGroupService/DisplayTextToolGroupService'; export { default as DisplayTextToolGroupService } from './src/WaxToolGroups/DisplayTextToolGroupService/DisplayTextToolGroupService';
export { default as BlockDropDownToolGroupService } from './src/WaxToolGroups/BlockDropDownToolGroupService/BlockDropDownToolGroupService'; export { default as BlockDropDownToolGroupService } from './src/WaxToolGroups/BlockDropDownToolGroupService/BlockDropDownToolGroupService';
export { default as TrackingAndEditingToolGroupService } from './src/WaxToolGroups/TrackingAndEditingToolGroupService/TrackingAndEditingToolGroupService';
export { default as FullScreenToolGroupService } from './src/WaxToolGroups/FullScreenToolGroupService/FullScreenToolGroupService';
export { default as SpecialCharactersToolGroupService } from './src/WaxToolGroups/SpecialCharactersToolGroupService/SpecialCharactersToolGroupService';
export { default as TextHighlightToolGroupServices } from './src/WaxToolGroups/TextHighlightToolGroupService/TextHighlightToolGroupService';
export { default as EditorInfoToolGroupServices } from './src/WaxToolGroups/BottomToolGroupService/InfoToolGroupService/EditorInfoToolGroupService';
export { default as TransformToolGroupService } from './src/WaxToolGroups/TransformToolGroupService/TransformToolGroupService';
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';
export { default as OENContainersToolGroupService } from './src/WaxToolGroups/OENContainersToolGroupService/OENContainersToolGroupService';
export { default as OENLeftToolGroupService } from './src/WaxToolGroups/OENLeftToolGroupService/OENLeftToolGroupService';
export { default as TitleToolGroupService } from './src/WaxToolGroups/TitleToolGroupService/TitleToolGroupService';
/* Plugins */ /* Plugins */
export { default as disallowPasteImagesPlugin } from './src/ImageService/plugins/disallowPasteImagesPlugin'; export { default as disallowPasteImagesPlugin } from './src/ImageService/plugins/disallowPasteImagesPlugin';
import UndoService from './UndoService/UndoService'; import UndoService from './UndoService/UndoService';
import RedoService from './RedoService/RedoService'; import RedoService from './RedoService/RedoService';
import SaveService from './SaveService/SaveService'; import SaveService from './SaveService/SaveService';
import BaseToolGroupService from './BaseToolGroupService/BaseToolGroupService';
export default [new UndoService(), new RedoService(), new SaveService()]; export default [
new UndoService(),
new RedoService(),
new SaveService(),
new BaseToolGroupService(),
];
import { Service } from 'wax-prosemirror-core'; import { Service } from 'wax-prosemirror-core';
import InfoToolGroup from './InfoTool'; import InfoToolGroup from './InfoTool';
class EditorInfoToolGroupServices extends Service { class EditorInfoToolGroupService extends Service {
name = 'EditorInfoToolGroupServices'; name = 'EditorInfoToolGroupService';
register() { register() {
this.container.bind('InfoToolGroup').to(InfoToolGroup); this.container.bind('InfoToolGroup').to(InfoToolGroup);
} }
} }
export default EditorInfoToolGroupServices; export default EditorInfoToolGroupService;
import CounterInfoService from './CounterInfoService/CounterInfoService'; import CounterInfoService from './CounterInfoService/CounterInfoService';
import ShortCutsInfoService from './ShortCutsInfoService/ShortCutsInfoService'; import ShortCutsInfoService from './ShortCutsInfoService/ShortCutsInfoService';
import EditorInfoToolGroupService from './InfoToolGroupService/EditorInfoToolGroupService';
export default [new CounterInfoService(), new ShortCutsInfoService()]; export default [
new CounterInfoService(),
new ShortCutsInfoService(),
new EditorInfoToolGroupService(),
];
...@@ -2,6 +2,7 @@ import { Service } from 'wax-prosemirror-core'; ...@@ -2,6 +2,7 @@ import { Service } from 'wax-prosemirror-core';
import codeBlockNode from './schema/codeBlockNode'; import codeBlockNode from './schema/codeBlockNode';
import highlightPlugin from './plugins/highlightPlugin'; import highlightPlugin from './plugins/highlightPlugin';
import CodeBlockTool from './CodeBlockTool'; import CodeBlockTool from './CodeBlockTool';
import CodeBlockToolGroupService from './CodeBlockToolGroupService/CodeBlockToolGroupService';
import './highlightStyles.css'; import './highlightStyles.css';
export default class CodeBlockService extends Service { export default class CodeBlockService extends Service {
...@@ -17,4 +18,6 @@ export default class CodeBlockService extends Service { ...@@ -17,4 +18,6 @@ export default class CodeBlockService extends Service {
code_block: codeBlockNode, code_block: codeBlockNode,
}); });
} }
dependencies = [new CodeBlockToolGroupService()];
} }
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