Image
The image
node is used to represent images in the document.
import {
} from 'prosekit/extensions/image' const defineImage function defineImage(): ImageExtension
= extension const extension: ImageExtension
() defineImage function defineImage(): ImageExtension
. editor const editor: Editor<ImageExtension>
. commands
Editor<ImageExtension>.commands: ToCommandAction<{ insertImage: [attrs?: ImageAttrs]; }>
All {@link CommandAction } s defined by the editor.({ insertImage
insertImage: CommandAction (attrs?: ImageAttrs | undefined) => boolean
Execute the current command. Return `true` if the command was successfully executed, otherwise `false`.: 'https://placehold.co/400' }) src ImageAttrs.src?: string | null | undefined