fix: Add ability to convert between checklist and other types of list
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import Token from "markdown-it/lib/token";
|
||||
import { NodeSpec, NodeType, Node as ProsemirrorNode } from "prosemirror-model";
|
||||
import { EditorState, Transaction } from "prosemirror-state";
|
||||
import { EditorState } from "prosemirror-state";
|
||||
import * as React from "react";
|
||||
import DisabledEmbed from "../components/DisabledEmbed";
|
||||
import { MarkdownSerializerState } from "../lib/markdown/serializer";
|
||||
import embedsRule from "../rules/embeds";
|
||||
import { ComponentProps } from "../types";
|
||||
import { ComponentProps, Dispatch } from "../types";
|
||||
import Node from "./Node";
|
||||
|
||||
const cache = {};
|
||||
@@ -117,7 +117,7 @@ export default class Embed extends Node {
|
||||
commands({ type }: { type: NodeType }) {
|
||||
return (attrs: Record<string, any>) => (
|
||||
state: EditorState,
|
||||
dispatch: (tr: Transaction) => void
|
||||
dispatch: Dispatch
|
||||
) => {
|
||||
dispatch(
|
||||
state.tr.replaceSelectionWith(type.create(attrs)).scrollIntoView()
|
||||
|
||||
Reference in New Issue
Block a user