diff --git a/wax-prosemirror-core/src/config/defaultServices/ShortCutsService/ShortCuts.js b/wax-prosemirror-core/src/config/defaultServices/ShortCutsService/ShortCuts.js index 5d052fa2666e3b1faa7cca32f5ea8dd8cbb5aac1..4c98df4ce580a32ef2402ae9cc02ac1ec48624b1 100644 --- a/wax-prosemirror-core/src/config/defaultServices/ShortCutsService/ShortCuts.js +++ b/wax-prosemirror-core/src/config/defaultServices/ShortCutsService/ShortCuts.js @@ -59,6 +59,10 @@ const backSpaceShortCut = (state, dispatch, view) => { }; const pressEnter = (state, dispatch) => { + // Images + if (state.selection.$head.parent.type.name === 'figcaption') { + return true; + } if (state.selection.node && state.selection.node.type.name === 'image') { const { $from, to } = state.selection; @@ -68,6 +72,7 @@ const pressEnter = (state, dispatch) => { dispatch(state.tr.setSelection(NodeSelection.create(state.doc, pos))); return true; } + // LISTS if (splitListItem(state.schema.nodes.list_item)(state)) { splitListItem(state.schema.nodes.list_item)(state, dispatch);