diff options
| author | bobzel <zzzman@gmail.com> | 2025-03-16 19:02:56 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2025-03-16 19:02:56 -0400 |
| commit | df708c90d8356934d2e3d9123129c761d328c1fe (patch) | |
| tree | 98b0588710ac8ca00c303960da0851614aacf597 /src/client/views/nodes/formattedText/ProsemirrorExampleTransfer.ts | |
| parent | 7d9fae09e8906e5636f6ea695ad560797b08d023 (diff) | |
| parent | f4042257be7359734a0dd35cedbf03fe4aa14cf1 (diff) | |
Merge branch 'DocCreatorMenu-work' of https://github.com/brown-dash/Dash-Web into DocCreatorMenu-work
Diffstat (limited to 'src/client/views/nodes/formattedText/ProsemirrorExampleTransfer.ts')
| -rw-r--r-- | src/client/views/nodes/formattedText/ProsemirrorExampleTransfer.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/nodes/formattedText/ProsemirrorExampleTransfer.ts b/src/client/views/nodes/formattedText/ProsemirrorExampleTransfer.ts index 7a8b72be0..3c84e5a10 100644 --- a/src/client/views/nodes/formattedText/ProsemirrorExampleTransfer.ts +++ b/src/client/views/nodes/formattedText/ProsemirrorExampleTransfer.ts @@ -349,7 +349,9 @@ export function buildKeymap<S extends Schema<any>>(schema: S, props: any): KeyMa dispatch(tx4); } - if (view.state.selection.$anchor.nodeAfter?.type === schema.nodes.text && once) { + if (view.state.selection.$anchor.depth > 0 && + view.state.selection.$anchor.node(view.state.selection.$anchor.depth-1).type === schema.nodes.list_item && + view.state.selection.$anchor.nodeAfter?.type === schema.nodes.text && once) { // if text is selected across list items, then we need to forcibly insert a new line since the splitBlock code joins the two list items. enter(view.state, dispatch, view, false); } |
