From f0f070ba1aa8af804e39667ecf71f91dba4ee27b Mon Sep 17 00:00:00 2001
From: chris <kokosias@yahoo.gr>
Date: Fri, 25 Sep 2020 18:03:19 +0300
Subject: [PATCH] alter notes schema

---
 wax-prosemirror-schema/src/nodes/footNoteNode.js | 2 +-
 wax-prosemirror-services/src/NoteService/Note.js | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/wax-prosemirror-schema/src/nodes/footNoteNode.js b/wax-prosemirror-schema/src/nodes/footNoteNode.js
index 4b98de07b..abbcdd9a4 100644
--- a/wax-prosemirror-schema/src/nodes/footNoteNode.js
+++ b/wax-prosemirror-schema/src/nodes/footNoteNode.js
@@ -8,7 +8,7 @@ const footnote = {
     id: { default: '' },
   },
   toDOM: node => {
-    return ['footnote', node.attrs, 0];
+    return ['footnote', node.attrs];
   },
   parseDOM: [
     {
diff --git a/wax-prosemirror-services/src/NoteService/Note.js b/wax-prosemirror-services/src/NoteService/Note.js
index 80dc15f5d..dea7314ff 100644
--- a/wax-prosemirror-services/src/NoteService/Note.js
+++ b/wax-prosemirror-services/src/NoteService/Note.js
@@ -13,8 +13,8 @@ class Note extends Tools {
 
   get run() {
     return (state, dispatch) => {
-      let { empty, $from, $to } = state.selection,
-        content = Fragment.empty;
+      const { empty, $from, $to } = state.selection;
+      let content = Fragment.empty;
       if (!empty && $from.sameParent($to) && $from.parent.inlineContent)
         content = $from.parent.content.cut(
           $from.parentOffset,
@@ -22,7 +22,7 @@ class Note extends Tools {
         );
       const footnote = state.config.schema.nodes.footnote.create(
         { id: uuidv4() },
-        Fragment.empty,
+        content,
       );
       dispatch(state.tr.replaceSelectionWith(footnote));
     };
-- 
GitLab