mirror of
https://github.com/heyman/heynote.git
synced 2025-06-27 13:01:51 +02:00
Add annotation on state change to ignore first block protection filter
This commit is contained in:
parent
81bbc2ed47
commit
650bb18c0b
@ -5,3 +5,4 @@ export const LANGUAGE_CHANGE = "heynote-change"
|
||||
export const CURRENCIES_LOADED = "heynote-currencies-loaded"
|
||||
export const SET_CONTENT = "heynote-set-content"
|
||||
export const ADD_NEW_BLOCK = "heynote-add-new-block"
|
||||
export const MOVE_BLOCK = "heynote-move-block"
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { EditorSelection } from "@codemirror/state"
|
||||
import { heynoteEvent, LANGUAGE_CHANGE, CURRENCIES_LOADED, ADD_NEW_BLOCK } from "../annotation.js";
|
||||
import { heynoteEvent, LANGUAGE_CHANGE, CURRENCIES_LOADED, ADD_NEW_BLOCK, MOVE_BLOCK } from "../annotation.js";
|
||||
import { blockState, getActiveNoteBlock, getFirstNoteBlock, getLastNoteBlock, getNoteBlockFromPos } from "./block"
|
||||
import { moveLineDown, moveLineUp } from "./move-lines.js";
|
||||
import { selectAll } from "./select-all.js";
|
||||
@ -362,6 +362,7 @@ function moveCurrentBlock(state, dispatch, up) {
|
||||
insert: newContent,
|
||||
},
|
||||
selection: newSelectionRange,
|
||||
annotations: [heynoteEvent.of(MOVE_BLOCK)],
|
||||
}, {
|
||||
scrollIntoView: true,
|
||||
userEvent: "input",
|
||||
|
Loading…
x
Reference in New Issue
Block a user