You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
Desktop: New Markdown editor: Fix horizontal rule button when cursor is not on a new line (#11085)
This commit is contained in:
@ -3,6 +3,7 @@ import { EditorCommandType, ListType } from '../../types';
|
||||
import { undo, redo, selectAll, indentSelection, cursorDocStart, cursorDocEnd, cursorLineStart, cursorLineEnd, deleteToLineStart, deleteToLineEnd, undoSelection, redoSelection, cursorPageDown, cursorPageUp, cursorCharRight, cursorCharLeft, insertNewlineAndIndent, cursorLineDown, cursorLineUp, toggleComment, deleteLine, moveLineUp, moveLineDown } from '@codemirror/commands';
|
||||
import {
|
||||
decreaseIndent, increaseIndent,
|
||||
insertHorizontalRule,
|
||||
toggleBolded, toggleCode,
|
||||
toggleHeaderLevel, toggleItalicized,
|
||||
toggleList, toggleMath,
|
||||
@ -41,6 +42,7 @@ const editorCommands: Record<EditorCommandType, EditorCommandFunction> = {
|
||||
[EditorCommandType.ToggleHeading3]: toggleHeaderLevel(3),
|
||||
[EditorCommandType.ToggleHeading4]: toggleHeaderLevel(4),
|
||||
[EditorCommandType.ToggleHeading5]: toggleHeaderLevel(5),
|
||||
[EditorCommandType.InsertHorizontalRule]: insertHorizontalRule,
|
||||
|
||||
[EditorCommandType.ScrollSelectionIntoView]: editor => {
|
||||
editor.dispatch(editor.state.update({
|
||||
|
Reference in New Issue
Block a user