diff options
author | bob <bcz@cs.brown.edu> | 2019-06-12 12:35:59 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-06-12 12:35:59 -0400 |
commit | a4f5005fedae93bd4bb1529561acaa8d4f0474c5 (patch) | |
tree | 6151c8f46a95b1738ebd518d64e821aedb0dc3b4 /src/client/util/TooltipTextMenu.tsx | |
parent | ce9adde20b611ea8300c402416ef41e4fb960919 (diff) |
"fixed" prosemirror serialization of 'star' schema node
Diffstat (limited to 'src/client/util/TooltipTextMenu.tsx')
-rw-r--r-- | src/client/util/TooltipTextMenu.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/util/TooltipTextMenu.tsx b/src/client/util/TooltipTextMenu.tsx index a2288a496..87a4c33a1 100644 --- a/src/client/util/TooltipTextMenu.tsx +++ b/src/client/util/TooltipTextMenu.tsx @@ -274,7 +274,7 @@ export class TooltipTextMenu { insertStar(state: EditorState<any>, dispatch: any) { console.log("creating star..."); - let newNode = schema.nodes.star.create({ visibility: false, oldtext: state.selection.content(), oldtextlen: state.selection.to - state.selection.from }); + let newNode = schema.nodes.star.create({ visibility: false, oldtext: state.selection.content(), oldtextslice: state.selection.content().toJSON(), oldtextlen: state.selection.to - state.selection.from }); if (dispatch) { console.log(newNode.attrs.oldtext.toString()); dispatch(state.tr.replaceSelectionWith(newNode)); |