mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-01-03 23:42:28 +03:00
Lexical: Merged list nodes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import {$getNearestNodeFromDOMNode, LexicalEditor} from "lexical";
|
||||
import {$isCustomListItemNode} from "../../../nodes/custom-list-item";
|
||||
import {$isListItemNode} from "@lexical/list";
|
||||
|
||||
class TaskListHandler {
|
||||
protected editorContainer: HTMLElement;
|
||||
@@ -38,7 +38,7 @@ class TaskListHandler {
|
||||
|
||||
this.editor.update(() => {
|
||||
const node = $getNearestNodeFromDOMNode(listItem);
|
||||
if ($isCustomListItemNode(node)) {
|
||||
if ($isListItemNode(node)) {
|
||||
node.setChecked(!node.getChecked());
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user