We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 855f2f5 commit 941ea37Copy full SHA for 941ea37
src/components/text-editor/prosemirror-adapter/menu/menu-commands.ts
@@ -189,6 +189,9 @@ const toggleNodeType = (
189
.setMeta('preserveWhitespace', true);
190
tr.replaceSelectionWith(schema.text($from.parent.textContent));
191
192
+ const newSelection = TextSelection.create(tr.doc, $from.pos, $to.pos);
193
+ tr.setSelection(newSelection);
194
+
195
if (dispatch) {
196
dispatch(tr);
197
}
@@ -211,6 +214,9 @@ const toggleNodeType = (
211
214
);
212
215
213
216
217
218
219
220
221
222
0 commit comments