Toggle current todo item with Mod-Enter
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
sinkListItem,
|
||||
liftListItem,
|
||||
} from "prosemirror-schema-list";
|
||||
import toggleCheckboxItem from "../commands/toggleCheckboxItem";
|
||||
import { MarkdownSerializerState } from "../lib/markdown/serializer";
|
||||
import checkboxRule from "../rules/checkboxes";
|
||||
import Node from "./Node";
|
||||
@@ -93,6 +94,7 @@ export default class CheckboxItem extends Node {
|
||||
checked: false,
|
||||
}),
|
||||
Tab: sinkListItem(type),
|
||||
"Mod-Enter": toggleCheckboxItem(),
|
||||
"Shift-Tab": liftListItem(type),
|
||||
"Mod-]": sinkListItem(type),
|
||||
"Mod-[": liftListItem(type),
|
||||
|
||||
@@ -83,7 +83,7 @@ export const basicExtensions: Nodes = [
|
||||
* editors that need advanced formatting.
|
||||
*/
|
||||
export const richExtensions: Nodes = [
|
||||
...basicExtensions.filter((n) => n !== SimpleImage),
|
||||
...basicExtensions.filter((n) => n !== SimpleImage && n !== Keys),
|
||||
Image,
|
||||
HardBreak,
|
||||
CodeBlock,
|
||||
@@ -109,6 +109,7 @@ export const richExtensions: Nodes = [
|
||||
Math,
|
||||
MathBlock,
|
||||
PreventTab,
|
||||
Keys,
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user