diff --git a/editors/editoria/src/index.js b/editors/editoria/src/index.js index 76ceac7b96749074afe72a73fccd90a17e127561..dfa81ea6d6773b79a98806c481083c41507939ad 100644 --- a/editors/editoria/src/index.js +++ b/editors/editoria/src/index.js @@ -2,8 +2,6 @@ import React from "react"; import ReactDOM from "react-dom"; import Editoria from "./Editoria"; import * as serviceWorker from "./serviceWorker"; -const { whyDidYouUpdate } = require("why-did-you-update"); -whyDidYouUpdate(React); ReactDOM.render(<Editoria />, document.getElementById("root")); // If you want your app to work offline and load faster, you can change diff --git a/wax-prosemirror-services/src/InlineAnnotations/CodeService/CodeService.js b/wax-prosemirror-services/src/InlineAnnotations/CodeService/CodeService.js index aa9e80f1ee9571e648e2a1701379a184111ce4df..c3e5baa8509cf643f6a23559618b8b93d94a360a 100644 --- a/wax-prosemirror-services/src/InlineAnnotations/CodeService/CodeService.js +++ b/wax-prosemirror-services/src/InlineAnnotations/CodeService/CodeService.js @@ -10,12 +10,14 @@ class CodeService extends Service { } register() { - this.container - .bind("schema") - .toConstantValue({ code: codeMark }) - .whenTargetNamed("mark"); - this.container.bind("Code").to(Code); + const createMark = this.container.get("CreateMark"); + createMark( + { + code: codeMark + }, + { toWaxSchema: true } + ); } } diff --git a/wax-prosemirror-services/src/InlineAnnotations/EmphasisService/EmphasisService.js b/wax-prosemirror-services/src/InlineAnnotations/EmphasisService/EmphasisService.js index 7114a88a152b45672eaa43f4cc2676d5f82d8995..846d341b64690650a538ab4eccfcbe821bf97e6d 100644 --- a/wax-prosemirror-services/src/InlineAnnotations/EmphasisService/EmphasisService.js +++ b/wax-prosemirror-services/src/InlineAnnotations/EmphasisService/EmphasisService.js @@ -11,13 +11,13 @@ class EmphasisService extends Service { register() { this.container.bind("Emphasis").to(Emphasis); - - this.container - .bind("schema") - .toConstantValue({ + const createMark = this.container.get("CreateMark"); + createMark( + { em: emphasisMark - }) - .whenTargetNamed("mark"); + }, + { toWaxSchema: true } + ); } } diff --git a/wax-prosemirror-services/src/InlineAnnotations/SmallCapsService/SmallCapsService.js b/wax-prosemirror-services/src/InlineAnnotations/SmallCapsService/SmallCapsService.js index 5e7959d59cc6018df1f2b7e8d46dd7baccaf1d45..6fcb6918e02b9079eafc980d62c7efa4536877f7 100644 --- a/wax-prosemirror-services/src/InlineAnnotations/SmallCapsService/SmallCapsService.js +++ b/wax-prosemirror-services/src/InlineAnnotations/SmallCapsService/SmallCapsService.js @@ -5,13 +5,13 @@ import SmallCaps from "./SmallCaps"; class SmallCapsService extends Service { register() { this.container.bind("SmallCaps").to(SmallCaps); - - this.container - .bind("schema") - .toConstantValue({ + const createMark = this.container.get("CreateMark"); + createMark( + { smallcaps: smallcapsMark - }) - .whenTargetNamed("mark"); + }, + { toWaxSchema: true } + ); } } diff --git a/wax-prosemirror-services/src/InlineAnnotations/StrikeThroughService/StrikeThroughService.js b/wax-prosemirror-services/src/InlineAnnotations/StrikeThroughService/StrikeThroughService.js index 8b4b291e27247fc15e2cc4ad8699ca20425fe998..99cbfbe7f4cc81f2fce228734baba3b9995e5801 100644 --- a/wax-prosemirror-services/src/InlineAnnotations/StrikeThroughService/StrikeThroughService.js +++ b/wax-prosemirror-services/src/InlineAnnotations/StrikeThroughService/StrikeThroughService.js @@ -4,13 +4,13 @@ import StrikeThrough from "./StrikeThrough"; class StrikeThroughService extends Service { register() { this.container.bind("StrikeThrough").to(StrikeThrough); - - this.container - .bind("schema") - .toConstantValue({ + const createMark = this.container.get("CreateMark"); + createMark( + { strikethrough: strikethroughMark - }) - .whenTargetNamed("mark"); + }, + { toWaxSchema: true } + ); } } diff --git a/wax-prosemirror-services/src/InlineAnnotations/SubscriptService/SubscriptService.js b/wax-prosemirror-services/src/InlineAnnotations/SubscriptService/SubscriptService.js index 31c8d37e47005af13886dfde8c14add0fe7d5f65..c7cabf7f80159d3be6534a85f4bce0a91fefa0fa 100644 --- a/wax-prosemirror-services/src/InlineAnnotations/SubscriptService/SubscriptService.js +++ b/wax-prosemirror-services/src/InlineAnnotations/SubscriptService/SubscriptService.js @@ -6,12 +6,14 @@ class SubscriptService extends Service { boot() {} register() { - this.container - .bind("schema") - .toConstantValue({ subscript: subscriptMark }) - .whenTargetNamed("mark"); - this.container.bind("Subscript").to(Subscript); + const createMark = this.container.get("CreateMark"); + createMark( + { + subscript: subscriptMark + }, + { toWaxSchema: true } + ); } } diff --git a/wax-prosemirror-services/src/InlineAnnotations/SuperscriptService/SuperscriptService.js b/wax-prosemirror-services/src/InlineAnnotations/SuperscriptService/SuperscriptService.js index 26ebd501ef320f210676f831d7a49ba21f6d52a1..6abb4c0d1003383babeffe84ebd52bbed78f6659 100644 --- a/wax-prosemirror-services/src/InlineAnnotations/SuperscriptService/SuperscriptService.js +++ b/wax-prosemirror-services/src/InlineAnnotations/SuperscriptService/SuperscriptService.js @@ -6,12 +6,14 @@ class SuperscriptService extends Service { boot() {} register() { - this.container - .bind("schema") - .toConstantValue({ superscript: superscriptMark }) - .whenTargetNamed("mark"); - this.container.bind("Superscript").to(Superscript); + const createMark = this.container.get("CreateMark"); + createMark( + { + superscript: superscriptMark + }, + { toWaxSchema: true } + ); } } diff --git a/wax-prosemirror-services/src/InlineAnnotations/UnderlineService/UnderlineService.js b/wax-prosemirror-services/src/InlineAnnotations/UnderlineService/UnderlineService.js index c72013b98ea41c9ed51d10fb4fd58a0dae724cc9..959f7406f72dd57b05227bc6ff2cdfb2bad7026f 100644 --- a/wax-prosemirror-services/src/InlineAnnotations/UnderlineService/UnderlineService.js +++ b/wax-prosemirror-services/src/InlineAnnotations/UnderlineService/UnderlineService.js @@ -11,13 +11,13 @@ class UnderlineService extends Service { register() { this.container.bind("Underline").to(Underline); - - this.container - .bind("schema") - .toConstantValue({ + const createMark = this.container.get("CreateMark"); + createMark( + { underline: underlineMark - }) - .whenTargetNamed("mark"); + }, + { toWaxSchema: true } + ); } } diff --git a/wax-prosemirror-services/src/ListsService/BulletListService/BulletListService.js b/wax-prosemirror-services/src/ListsService/BulletListService/BulletListService.js index a320d5f36b796b68b8af8cb1f6e2a706b1ce73f4..7e2b4403a6c67e30947961344a8bbb10811a53aa 100644 --- a/wax-prosemirror-services/src/ListsService/BulletListService/BulletListService.js +++ b/wax-prosemirror-services/src/ListsService/BulletListService/BulletListService.js @@ -7,11 +7,13 @@ class BulletListService extends Service { register() { this.container.bind("BulletList").to(BulletList); - - this.container - .bind("schema") - .toConstantValue({ bulletlist: bulletListNode }) - .whenTargetNamed("node"); + const createNode = this.container.get("CreateNode"); + createNode( + { + bulletlist: bulletListNode + }, + { toWaxSchema: true } + ); } } diff --git a/wax-prosemirror-services/src/ListsService/ListItemService/ListItemService.js b/wax-prosemirror-services/src/ListsService/ListItemService/ListItemService.js index c785f427d9faeaa7059c0a0400442fde6f03fe91..1de99c1bcfb9cac28f0d8d44f4042e63958f162d 100644 --- a/wax-prosemirror-services/src/ListsService/ListItemService/ListItemService.js +++ b/wax-prosemirror-services/src/ListsService/ListItemService/ListItemService.js @@ -5,10 +5,13 @@ class ListItemService extends Service { boot() {} register() { - this.container - .bind("schema") - .toConstantValue({ list_item: listItemNode }) - .whenTargetNamed("node"); + const createNode = this.container.get("CreateNode"); + createNode( + { + list_item: listItemNode + }, + { toWaxSchema: true } + ); } } diff --git a/wax-prosemirror-services/src/ListsService/OrderedListService/OrderedListService.js b/wax-prosemirror-services/src/ListsService/OrderedListService/OrderedListService.js index 063df8080ad43332efc1562e8b5209f32217cfc2..42ca2d420f68829ab1c3467fe64c0f9edbe4b3fd 100644 --- a/wax-prosemirror-services/src/ListsService/OrderedListService/OrderedListService.js +++ b/wax-prosemirror-services/src/ListsService/OrderedListService/OrderedListService.js @@ -7,10 +7,13 @@ class OrderedListService extends Service { register() { this.container.bind("OrderedList").to(OrderedList); - this.container - .bind("schema") - .toConstantValue({ orderedlist: orderedListNode }) - .whenTargetNamed("node"); + const createNode = this.container.get("CreateNode"); + createNode( + { + orderedlist: orderedListNode + }, + { toWaxSchema: true } + ); } } diff --git a/wax-prosemirror-services/src/TablesService/InsertTableService/InsertTableService.js b/wax-prosemirror-services/src/TablesService/InsertTableService/InsertTableService.js index 541ff1ac2a59a2b05f6f84cfd46b8ad15ae1053d..ceee67bfb91541fb7028194bc9a397ab737a0aec 100644 --- a/wax-prosemirror-services/src/TablesService/InsertTableService/InsertTableService.js +++ b/wax-prosemirror-services/src/TablesService/InsertTableService/InsertTableService.js @@ -8,11 +8,11 @@ class InsertTableService extends Service { register() { this.container.bind("Table").to(Table); - const createNode = this.container.get("CreateNode"); const { table, table_row, table_cell, table_header } = tableNodes({ tableGroup: "block", cellContent: "block+" }); + const createNode = this.container.get("CreateNode"); createNode({ table