xLog/src/editor/Bold.tsx

12 lines
271 B
TypeScript

import { EditorSelection } from "@codemirror/state"
import { ICommand, wrapExecute } from "."
export const Bold: ICommand = {
name: "bold",
label: "Bold",
icon: "i-bi:type-bold",
execute: (view) => {
wrapExecute({ view, prepend: "**", append: "**" })
},
}