From 81e9893b177223ea08d1c170eea752c621eeb04f Mon Sep 17 00:00:00 2001
From: chris <kokosias@yahoo.gr>
Date: Tue, 21 Sep 2021 12:44:08 +0300
Subject: [PATCH] temp fix for injecting schema

---
 .../UnderlineService/UnderlineService.js      | 20 +++++++++----------
 .../src/ShortCutsService/ShortCutsService.js  |  9 +++++----
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/wax-prosemirror-services/src/InlineAnnotations/UnderlineService/UnderlineService.js b/wax-prosemirror-services/src/InlineAnnotations/UnderlineService/UnderlineService.js
index 5035e45d5..422b763ed 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 1fd9a92c1..96d705b12 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(
-- 
GitLab