import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; import { EditorBubbleItem, useEditor } from "novel"; import { selectionItems } from "./selection-items"; const items = selectionItems.filter((item) => item.inline); export const TextButtons = () => { const { editor } = useEditor(); if (!editor) return null; return (
{items.map((item) => ( { item.command(editor); }} > ))}
); };