fix: Keyboard navigation around inline code marks (#5477)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import codemark from "prosemirror-codemark";
|
||||
import { toggleMark } from "prosemirror-commands";
|
||||
import {
|
||||
MarkSpec,
|
||||
@@ -8,8 +9,6 @@ import {
|
||||
} from "prosemirror-model";
|
||||
import { Plugin } from "prosemirror-state";
|
||||
import { EditorView } from "prosemirror-view";
|
||||
import moveLeft from "../commands/moveLeft";
|
||||
import moveRight from "../commands/moveRight";
|
||||
import markInputRule from "../lib/markInputRule";
|
||||
import { MarkdownSerializerState } from "../lib/markdown/serializer";
|
||||
import Mark from "./Mark";
|
||||
@@ -57,13 +56,12 @@ export default class Code extends Mark {
|
||||
// https://github.com/ProseMirror/prosemirror/issues/515
|
||||
return {
|
||||
"Mod`": toggleMark(type),
|
||||
ArrowLeft: moveLeft(),
|
||||
ArrowRight: moveRight(),
|
||||
};
|
||||
}
|
||||
|
||||
get plugins() {
|
||||
return [
|
||||
...codemark({ markType: this.editor.schema.marks.code_inline }),
|
||||
new Plugin({
|
||||
props: {
|
||||
// Typing a character inside of two backticks will wrap the character
|
||||
|
||||
Reference in New Issue
Block a user