Files
xLog/src/editor/Link.tsx
T
2022-06-01 00:58:02 +08:00

12 lines
282 B
TypeScript

import { EditorSelection } from "@codemirror/state"
import { ICommand, prependExecute, wrapExecute } from "."
export const Link: ICommand = {
name: "link",
label: "Link",
icon: "i-bi:link",
execute: (view) => {
wrapExecute({ view, prepend: "[", append: "]()" })
},
}