diff --git a/wax-prosemirror-utilities/src/document/DocumentHelpers.js b/wax-prosemirror-utilities/src/document/DocumentHelpers.js index c0a68f5b0de20f6c45a1446f4a65f6072d8ba988..b6c479445d7a6778e8fdd96ddb6cf97fb133d005 100644 --- a/wax-prosemirror-utilities/src/document/DocumentHelpers.js +++ b/wax-prosemirror-utilities/src/document/DocumentHelpers.js @@ -42,10 +42,13 @@ const getSelectionMark = (state, PMmark) => { return markFound; }; +/* this is a workaround for now to find marks + that are pm will break them +*/ const findFragmentedMark = (state, PMmark) => { const { selection: { $from, $to }, doc } = state; - const fromPos = [$from.pos, $from.pos + 1]; - const toPos = [$to.pos, $to.pos + 1]; + const fromPos = [$from.pos - 1, $from.pos]; + const toPos = [$to.pos - 1, $to.pos]; let markFound; for (let i = 0; i < fromPos.length; i++) {