diff --git a/wax-prosemirror-services/src/InlineAnnotations/UnderlineService/UnderlineService.js b/wax-prosemirror-services/src/InlineAnnotations/UnderlineService/UnderlineService.js index 5035e45d527749b1fd24c5f25c912e1de0697f7e..422b763edb2f08853f9b1a98eaa1c24453008c42 100644 --- a/wax-prosemirror-services/src/InlineAnnotations/UnderlineService/UnderlineService.js +++ b/wax-prosemirror-services/src/InlineAnnotations/UnderlineService/UnderlineService.js @@ -1,22 +1,22 @@ -import Service from "../../Service"; -import { toggleMark } from "prosemirror-commands"; -import { underlineMark } from "wax-prosemirror-schema"; -import Underline from "./Underline"; +import { toggleMark } from 'prosemirror-commands'; +import { underlineMark } from 'wax-prosemirror-schema'; +import Underline from './Underline'; +import Service from '../../Service'; class UnderlineService extends Service { boot() { - const shortCuts = this.container.get("ShortCuts"); - shortCuts.addShortCut({ "Mod-u": toggleMark(this.schema.marks.underline) }); + const shortCuts = this.container.get('ShortCuts'); + shortCuts.addShortCut({ 'Mod-u': toggleMark(this.schema.marks.underline) }); } register() { - this.container.bind("Underline").to(Underline); - const createMark = this.container.get("CreateMark"); + this.container.bind('Underline').to(Underline); + const createMark = this.container.get('CreateMark'); createMark( { - underline: underlineMark + underline: underlineMark, }, - { toWaxSchema: true } + { toWaxSchema: true }, ); } } diff --git a/wax-prosemirror-services/src/ShortCutsService/ShortCutsService.js b/wax-prosemirror-services/src/ShortCutsService/ShortCutsService.js index 1fd9a92c1ab5a4d4118ff7616357bbccfd8a721d..96d705b12e6fb30e1e7e52807d1af34afb2894d7 100644 --- a/wax-prosemirror-services/src/ShortCutsService/ShortCutsService.js +++ b/wax-prosemirror-services/src/ShortCutsService/ShortCutsService.js @@ -16,10 +16,11 @@ export default class ShortCutsService extends Service { .bind('ShortCuts') .toDynamicValue(() => { if (this.app.schema) { - return new ShortCuts( - PmPlugins, - this.container.get('Schema').getSchema(), - ); + const { + schema: { schema }, + } = this.app; + + return new ShortCuts(PmPlugins, schema); } return new ShortCuts(