diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/markdown.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/markdown.js index dd020e780..e75e1b617 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/markdown.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/markdown.js @@ -199,6 +199,9 @@ RED.editor.types._markdown = (function() { } } else { editor.session.replace(editor.selection.getRange(), (style.before||"")+current+(style.after||"")); + if (current === "") { + editor.gotoLine(range.start.row+1,range.start.column+(style.before||"").length,false); + } } editor.focus(); }); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js b/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js index 284bd6243..bb8fac23b 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js @@ -150,13 +150,14 @@ RED.workspaces = (function() { $('