From bada3064e95186520a6fcd4d51263de7a7bd4aac Mon Sep 17 00:00:00 2001
From: chris <kokosias@yahoo.gr>
Date: Thu, 19 Dec 2019 21:20:55 +0200
Subject: [PATCH] fix strikeThrough service

---
 .../StrikeThroughService/StrikeThrough.js              |  3 +--
 .../StrikeThroughService/StrikeThroughService.js       |  3 +--
 wax-prosemirror-plugins/src/SchemaService/ParseRule.js |  2 +-
 wax-prosemirror-plugins/src/SchemaService/Schema.js    | 10 +++++++---
 4 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/wax-prosemirror-plugins/src/InlineAnnotations/StrikeThroughService/StrikeThrough.js b/wax-prosemirror-plugins/src/InlineAnnotations/StrikeThroughService/StrikeThrough.js
index c89a7d66f..ef38b0a08 100644
--- a/wax-prosemirror-plugins/src/InlineAnnotations/StrikeThroughService/StrikeThrough.js
+++ b/wax-prosemirror-plugins/src/InlineAnnotations/StrikeThroughService/StrikeThrough.js
@@ -17,8 +17,7 @@ export default class StrikeThrough extends Tools {
 
   get active() {
     return state => {
-      console.log(state.config);
-      // return markActive(state.config.schema.marks.strikethrough)(state);
+      return markActive(state.config.schema.marks.strikethrough)(state);
     };
   }
 }
diff --git a/wax-prosemirror-plugins/src/InlineAnnotations/StrikeThroughService/StrikeThroughService.js b/wax-prosemirror-plugins/src/InlineAnnotations/StrikeThroughService/StrikeThroughService.js
index e4d8d931b..8b4b291e2 100644
--- a/wax-prosemirror-plugins/src/InlineAnnotations/StrikeThroughService/StrikeThroughService.js
+++ b/wax-prosemirror-plugins/src/InlineAnnotations/StrikeThroughService/StrikeThroughService.js
@@ -1,7 +1,6 @@
 import Service from "wax-prosemirror-core/src/services/Service";
 import { strikethroughMark } from "wax-prosemirror-schema";
 import StrikeThrough from "./StrikeThrough";
-console.log(strikethroughMark);
 class StrikeThroughService extends Service {
   register() {
     this.container.bind("StrikeThrough").to(StrikeThrough);
@@ -9,7 +8,7 @@ class StrikeThroughService extends Service {
     this.container
       .bind("schema")
       .toConstantValue({
-        em: strikethroughMark
+        strikethrough: strikethroughMark
       })
       .whenTargetNamed("mark");
   }
diff --git a/wax-prosemirror-plugins/src/SchemaService/ParseRule.js b/wax-prosemirror-plugins/src/SchemaService/ParseRule.js
index 5f757b0fe..f47be611b 100644
--- a/wax-prosemirror-plugins/src/SchemaService/ParseRule.js
+++ b/wax-prosemirror-plugins/src/SchemaService/ParseRule.js
@@ -31,7 +31,7 @@ export default class ParseRule {
         return omit(hooks, ["dom"]);
       };
     }
-    console.log(rule, "rule");
+
     return rule;
   }
 
diff --git a/wax-prosemirror-plugins/src/SchemaService/Schema.js b/wax-prosemirror-plugins/src/SchemaService/Schema.js
index 390b3b5bc..8360e36e6 100644
--- a/wax-prosemirror-plugins/src/SchemaService/Schema.js
+++ b/wax-prosemirror-plugins/src/SchemaService/Schema.js
@@ -12,8 +12,12 @@ export default class Schema {
   schema = null;
 
   constructor(
-    @multiInject("schema") @named("mark") marks,
-    @multiInject("schema") @named("node") nodes
+    @multiInject("schema")
+    @named("mark")
+    marks,
+    @multiInject("schema")
+    @named("node")
+    nodes
   ) {
     this.setNodes(nodes);
     this.setMarks(marks);
@@ -94,10 +98,10 @@ export default class Schema {
       nodes[index] = this._nodes[index].toJSON();
     }
 
+    console.log(this._marks);
     for (let index in this._marks) {
       marks[index] = this._marks[index].toJSON();
     }
-
     this.schema = new PmPschema({ nodes, marks });
     return this.schema;
   }
-- 
GitLab