Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

✨ Add rich text (Markdown) editor for poll/event descriptions (RAL-1222) (#2653)

Luke Vella7df17ebcea6c
diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.json
index 5f6332d48..f5e2996bc 100644
--- a/apps/web/public/locales/en/app.json
+++ b/apps/web/public/locales/en/app.json
@@ -210,6 +210,7 @@
"describeYourEvent": "Describe what your event is about",
"description": "Description",
"descriptionPlaceholder": "Hey everyone, please choose the dates that work for you!",
+ "descriptionTooLong": "Description must be at most {count} characters",
"developer": "Developer",
"disableCommentsDescription": "Remove the option to leave comments on the poll.",
"disableCommentsTitle": "Disable comments",
@@ -565,6 +566,15 @@
"revoke": "Revoke",
"revokeConfirmation": "Are you sure you want to revoke {name}? This will immediately disable the key.",
"revoked": "Revoked",
+ "richTextBold": "Bold",
+ "richTextBulletList": "Bullet list",
+ "richTextItalic": "Italic",
+ "richTextLink": "Link",
+ "richTextLinkApply": "Apply",
+ "richTextLinkPlaceholder": "Paste or type a link",
+ "richTextLinkRemove": "Remove link",
+ "richTextLinkVisit": "Open link in new tab",
+ "richTextNumberedList": "Numbered list",
"role": "Role",
"roleChangedError": "Failed to change role",
"roleChangedSuccess": "Role changed successfully",
diff --git a/apps/web/src/features/poll/components/forms/lazy-rich-text-editor.tsx b/apps/web/src/features/poll/components/forms/lazy-rich-text-editor.tsx
new file mode 100644
index 000000000..c89ebd0bf
--- /dev/null
+++ b/apps/web/src/features/poll/components/forms/lazy-rich-text-editor.tsx
@@ -0,0 +1,14 @@
+"use client";
+
+import type { RichTextEditor as RichTextEditorType } from "@rallly/ui/rich-text-editor";
+import dynamic from "next/dynamic";
+
+export const LazyRichTextEditor = dynamic(
+ () => import("@rallly/ui/rich-text-editor").then((mod) => mod.RichTextEditor),
+ {
+ ssr: false,
+ loading: () => (
+ <div className="min-h-32 w-full rounded-lg border border-input bg-transparent shadow-xs" />
+ ),
+ },
+) as typeof RichTextEditorType;
diff --git a/apps/web/src/features/poll/components/forms/poll-details-form.tsx b/apps/web/src/features/poll/components/forms/poll-details-form.tsx
index 0d3b29ad0..3988c9293 100644
--- a/apps/web/src/features/poll/components/forms/poll-details-form.tsx
+++ b/apps/web/src/features/poll/components/forms/poll-details-form.tsx
@@ -1,11 +1,14 @@
+import { Button } from "@rallly/ui/button";
import { FormField, FormItem, FormLabel, FormMessage } from "@rallly/ui/form";
import { Input } from "@rallly/ui/input";
-import { Textarea } from "@rallly/ui/textarea";
-import { useFormContext } from "react-hook-form";
-
+import { PlusIcon } from "lucide-react";
+import * as React from "react";
+import { Controller, useFormContext } from "react-hook-form";
+import { MAX_POLL_DESCRIPTION_LENGTH } from "@/features/poll/schema";
import { Trans, useTranslation } from "@/i18n/client";
import { useFormValidation } from "@/lib/utils/form-validation";
+import { LazyRichTextEditor } from "./lazy-rich-text-editor";
import type { NewEventData } from "./types";
export const PollDetailsForm = () => {
@@ -55,23 +58,111 @@ export const PollDetailsForm = () => {
{...register("location")}
/>
</FormItem>
- <FormItem>
- <div>
- <FormLabel className="inline-block" htmlFor="description">
- {t("description")}
- </FormLabel>
- <span className="ml-1 text-muted-foreground text-sm">
- <Trans i18nKey="optionalLabel" defaults="(Optional)" />
- </span>
- </div>
- <Textarea
- className="w-full"
- id="description"
- placeholder={t("descriptionPlaceholder")}
- rows={5}
- {...register("description")}
- />
- </FormItem>
+ <DescriptionField />
</div>
);
};
+
+const DescriptionField = () => {
+ const { t } = useTranslation();
+ const form = useFormContext<NewEventData>();
+
+ // Reveal the editor whenever the field holds content — this covers values
+ // restored asynchronously (persisted drafts, the edit form) that aren't yet
+ // present on first render — or once the user opens it via the button. Remove
+ // clears the value and resets `opened`, so it collapses again.
+ const [opened, setOpened] = React.useState(false);
+ const hasContent = !!form.watch("description")?.trim();
+ const expanded = opened || hasContent;
+
+ if (!expanded) {
+ return (
+ <div>
+ <Button
+ type="button"
+ variant="link"
+ size="sm"
+ className="h-auto p-0 text-muted-foreground hover:text-foreground"
+ onClick={() => setOpened(true)}
+ >
+ <PlusIcon data-icon="inline-start" />
+ <Trans i18nKey="addDescription" defaults="Add description" />
+ </Button>
+ </div>
+ );
+ }
+
+ return (
+ <FormItem>
+ <div className="flex items-center justify-between">
+ <FormLabel id="description-label" htmlFor="description">
+ {t("description")}
+ </FormLabel>
+ <Button
+ type="button"
+ variant="link"
+ size="sm"
+ className="h-auto p-0 text-muted-foreground hover:text-foreground"
+ onClick={() => {
+ form.setValue("description", "");
+ setOpened(false);
+ }}
+ >
+ <Trans i18nKey="remove" defaults="Remove" />
+ </Button>
+ </div>
+ <Controller
+ control={form.control}
+ name="description"
+ rules={{
+ maxLength: {
+ value: MAX_POLL_DESCRIPTION_LENGTH,
+ message: t("descriptionTooLong", {
+ defaultValue: "Description must be at most {count} characters",
+ count: MAX_POLL_DESCRIPTION_LENGTH,
+ }),
+ },
+ }}
+ render={({ field, fieldState }) => (
+ <>
+ <LazyRichTextEditor
+ id="description"
+ aria-labelledby="description-label"
+ value={field.value ?? ""}
+ onChange={field.onChange}
+ onBlur={field.onBlur}
+ maxLength={MAX_POLL_DESCRIPTION_LENGTH}
+ placeholder={t("descriptionPlaceholder")}
+ labels={{
+ bold: t("richTextBold", { defaultValue: "Bold" }),
+ italic: t("richTextItalic", { defaultValue: "Italic" }),
+ link: t("richTextLink", { defaultValue: "Link" }),
+ bulletList: t("richTextBulletList", {
+ defaultValue: "Bullet list",
+ }),
+ numberedList: t("richTextNumberedList", {
+ defaultValue: "Numbered list",
+ }),
+ linkPlaceholder: t("richTextLinkPlaceholder", {
+ defaultValue: "Paste or type a link",
+ }),
+ linkApply: t("richTextLinkApply", { defaultValue: "Apply" }),
+ linkRemove: t("richTextLinkRemove", {
+ defaultValue: "Remove link",
+ }),
+ linkVisit: t("richTextLinkVisit", {
+ defaultValue: "Open link in new tab",
+ }),
+ }}
+ />
+ {fieldState.error ? (
+ <p className="text-destructive text-sm">
+ {fieldState.error.message}
+ </p>
+ ) : null}
+ </>
+ )}
+ />
+ </FormItem>
+ );
+};
diff --git a/apps/web/src/features/poll/schema.ts b/apps/web/src/features/poll/schema.ts
index 2d1d89f62..6e1df71fc 100644
--- a/apps/web/src/features/poll/schema.ts
+++ b/apps/web/src/features/poll/schema.ts
@@ -1,5 +1,12 @@
import * as z from "zod";
+// Descriptions are Markdown pushed raw into the iCal DESCRIPTION. RFC 5545 sets
+// no length limit; the binding constraint is Google Calendar, which caps the
+// DESCRIPTION around 8192 chars. 8000 sits just under that and covers every
+// existing poll — including long institutional event invites — so no real
+// content is rejected.
+export const MAX_POLL_DESCRIPTION_LENGTH = 8000;
+
export const pollStatusSchema = z.enum([
"open",
"closed",
diff --git a/apps/web/src/trpc/routers/polls.ts b/apps/web/src/trpc/routers/polls.ts
index 27f84ea75..e09460152 100644
--- a/apps/web/src/trpc/routers/polls.ts
+++ b/apps/web/src/trpc/routers/polls.ts
@@ -15,6 +15,7 @@ import {
getPolls,
hasPollAdminAccess,
} from "@/features/poll/data";
+import { MAX_POLL_DESCRIPTION_LENGTH } from "@/features/poll/schema";
import { formatEventDateTime } from "@/features/scheduled-event/utils";
import { getActiveSpaceForUser } from "@/features/space/data";
import { dayjs } from "@/lib/dayjs";
@@ -111,7 +112,12 @@ export const polls = router({
title: z.string().trim().min(1),
timeZone: timeZoneInput,
location: z.string().trim().optional(),
- description: z.string().trim().transform(collapseNewlines).optional(),
+ description: z
+ .string()
+ .trim()
+ .max(MAX_POLL_DESCRIPTION_LENGTH)
+ .transform(collapseNewlines)
+ .optional(),
hideParticipants: z.boolean().optional(),
hideScores: z.boolean().optional(),
disableComments: z.boolean().optional(),
@@ -303,7 +309,12 @@ export const polls = router({
title: z.string().trim().optional(),
timeZone: timeZoneInput,
location: z.string().trim().optional(),
- description: z.string().trim().transform(collapseNewlines).optional(),
+ description: z
+ .string()
+ .trim()
+ .max(MAX_POLL_DESCRIPTION_LENGTH)
+ .transform(collapseNewlines)
+ .optional(),
optionsToDelete: z.string().array().optional(),
optionsToAdd: z.string().array().optional(),
hideParticipants: z.boolean().optional(),
diff --git a/apps/web/tests/new-poll-page.ts b/apps/web/tests/new-poll-page.ts
index f176ac4fd..567dd4242 100644
--- a/apps/web/tests/new-poll-page.ts
+++ b/apps/web/tests/new-poll-page.ts
@@ -28,9 +28,15 @@ export class NewPollPage {
await page.getByLabel(/title|event/i).fill(name);
await page.getByLabel("Location").fill("Online");
- await page
- .getByLabel("Description")
- .fill("Hey everyone, what time can you meet?");
+
+ // The description is a rich text editor revealed on demand, so open it, then
+ // type into its contenteditable (fill() doesn't work on contenteditable).
+ await page.getByRole("button", { name: /add description/i }).click();
+ const description = page.locator('#description[contenteditable="true"]');
+ await description.click();
+ await description.pressSequentially(
+ "Hey everyone, what time can you meet?",
+ );
await page.getByTitle("Next month").click();
diff --git a/packages/ui/package.json b/packages/ui/package.json
index 34af00e10..6038555ca 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -23,6 +23,12 @@
"@rallly/tailwind-config": "workspace:*",
"@react-aria/color": "^3.1.5",
"@react-stately/color": "^3.9.5",
+ "@tiptap/extension-link": "3.27.3",
+ "@tiptap/extension-placeholder": "3.27.3",
+ "@tiptap/markdown": "3.27.3",
+ "@tiptap/pm": "3.27.3",
+ "@tiptap/react": "3.27.3",
+ "@tiptap/starter-kit": "3.27.3",
"class-variance-authority": "^0.7.1",
"clsx": "^1.2.1",
"cmdk": "^1.1.1",
diff --git a/packages/ui/src/rich-text-editor.test.tsx b/packages/ui/src/rich-text-editor.test.tsx
new file mode 100644
index 000000000..28610ae75
--- /dev/null
+++ b/packages/ui/src/rich-text-editor.test.tsx
@@ -0,0 +1,98 @@
+import { render } from "@testing-library/react";
+import { Editor } from "@tiptap/react";
+import { describe, expect, it } from "vitest";
+
+import { MarkdownDescription } from "./markdown-description";
+import { baseExtensions } from "./rich-text-editor";
+
+// Reuse the component's exact extension set so the serializer AND the
+// isAllowedUri link validation under test stay in sync automatically.
+function makeEditor(content: string, contentType: "html" | "markdown") {
+ return new Editor({
+ extensions: [...baseExtensions],
+ content,
+ contentType,
+ });
+}
+
+function htmlToMarkdown(html: string) {
+ const editor = makeEditor(html, "html");
+ const md = editor.getMarkdown();
+ editor.destroy();
+ return md;
+}
+
+function roundTrip(markdown: string) {
+ const editor = makeEditor(markdown, "markdown");
+ const md = editor.getMarkdown();
+ editor.destroy();
+ return md;
+}
+
+describe("RichTextEditor markdown serialization", () => {
+ it("serializes the allowed formatting subset to markdown", () => {
+ const md = htmlToMarkdown(
+ "<p><strong>bold</strong> and <em>italic</em></p>" +
+ "<ul><li><p>one</p></li><li><p>two</p></li></ul>" +
+ "<ol><li><p>first</p></li><li><p>second</p></li></ol>" +
+ '<p><a href="https://example.com">link</a></p>',
+ );
+ expect(md).toContain("**bold**");
+ expect(md).toContain("*italic*");
+ expect(md).toContain("- one");
+ expect(md).toContain("- two");
+ expect(md).toContain("1. first");
+ expect(md).toContain("2. second");
+ expect(md).toContain("[link](https://example.com)");
+ });
+
+ it("round-trips formatted markdown (parse -> serialize)", () => {
+ const source =
+ "**bold** and *italic*\n\n- one\n- two\n\n1. first\n2. second";
+ expect(roundTrip(source).trim()).toBe(source);
+ });
+
+ it("keeps plain text (existing descriptions) intact", () => {
+ const source = "Just a regular description with no formatting.";
+ expect(roundTrip(source).trim()).toBe(source);
+ });
+
+ it("emits markdown the MarkdownDescription renderer displays as intended", () => {
+ // Closes the loop: whatever the editor produces must render as the intended
+ // tags when shown on the poll/event page.
+ const md = htmlToMarkdown(
+ "<p>Meet at <strong>noon</strong></p><ul><li><p>bring ID</p></li></ul>",
+ );
+ const { container } = render(<MarkdownDescription content={md} />);
+ expect(container.querySelector("strong")?.textContent).toBe("noon");
+ expect(container.querySelector("ul")).not.toBeNull();
+ expect(container.querySelector("li")?.textContent).toContain("bring ID");
+ });
+});
+
+describe("RichTextEditor link validation (isAllowedUri)", () => {
+ it("keeps allowed schemes and bare URLs", () => {
+ for (const href of [
+ "https://example.com",
+ "http://example.com",
+ "mailto:[email protected]",
+ ]) {
+ const editor = makeEditor(`<a href="${href}">x</a>`, "html");
+ expect(editor.getAttributes("link").href).toBe(href);
+ editor.destroy();
+ }
+ });
+
+ it("rejects dangerous URL schemes", () => {
+ for (const href of [
+ "javascript:alert(1)",
+ "data:text/html,<script>alert(1)</script>",
+ "ftp://example.com",
+ "tel:+123456789",
+ ]) {
+ const editor = makeEditor(`<a href="${href}">x</a>`, "html");
+ expect(editor.getAttributes("link").href).toBeFalsy();
+ editor.destroy();
+ }
+ });
+});
diff --git a/packages/ui/src/rich-text-editor.tsx b/packages/ui/src/rich-text-editor.tsx
new file mode 100644
index 000000000..c21ec7175
--- /dev/null
+++ b/packages/ui/src/rich-text-editor.tsx
@@ -0,0 +1,405 @@
+"use client";
+
+import { Link } from "@tiptap/extension-link";
+import { Placeholder } from "@tiptap/extension-placeholder";
+import { Markdown } from "@tiptap/markdown";
+import type { Editor as TiptapEditor } from "@tiptap/react";
+import { EditorContent, useEditor, useEditorState } from "@tiptap/react";
+import { BubbleMenu } from "@tiptap/react/menus";
+import { StarterKit } from "@tiptap/starter-kit";
+import {
+ BoldIcon,
+ ExternalLinkIcon,
+ ItalicIcon,
+ LinkIcon,
+ ListIcon,
+ ListOrderedIcon,
+} from "lucide-react";
+import * as React from "react";
+
+import { Button } from "./button";
+import {
+ InputGroup,
+ InputGroupAddon,
+ InputGroupButton,
+ InputGroupInput,
+} from "./input-group";
+import { cn } from "./lib/utils";
+import { Popover, PopoverContent, PopoverTrigger } from "./popover";
+
+// Exported so tests exercise the exact extension set — including the
+// isAllowedUri link validation that is the editor's XSS guard.
+export const baseExtensions = [
+ StarterKit.configure({
+ heading: false,
+ code: false,
+ codeBlock: false,
+ blockquote: false,
+ strike: false,
+ horizontalRule: false,
+ underline: false,
+ link: false,
+ }),
+ Markdown,
+ Link.configure({
+ openOnClick: false,
+ autolink: true,
+ defaultProtocol: "https",
+ protocols: ["mailto"],
+ isAllowedUri: (url, ctx) => {
+ if (!ctx.defaultValidate(url)) return false;
+ // Bare URLs (no scheme) autolink to defaultProtocol — allow them. Only
+ // reject when an explicit scheme is present and not in our allowlist,
+ // which keeps out javascript:/ftp:/tel: etc.
+ const scheme = url.match(/^([a-z][a-z0-9+.-]*):/i)?.[1]?.toLowerCase();
+ return !scheme || ["http", "https", "mailto"].includes(scheme);
+ },
+ }),
+];
+
+export function RichTextEditor({
+ value,
+ onChange,
+ onBlur,
+ placeholder,
+ className,
+ id,
+ maxLength,
+ "aria-labelledby": ariaLabelledBy,
+ labels,
+}: {
+ value?: string;
+ onChange?: (markdown: string) => void;
+ onBlur?: () => void;
+ placeholder?: string;
+ className?: string;
+ id?: string;
+ /** Character cap on the Markdown source. Shows a counter as the user nears
+ * it and flags the count when exceeded. Advisory — enforcement is server-side. */
+ maxLength?: number;
+ "aria-labelledby"?: string;
+ labels: {
+ bold: string;
+ italic: string;
+ link: string;
+ bulletList: string;
+ numberedList: string;
+ linkPlaceholder: string;
+ linkApply: string;
+ linkRemove: string;
+ linkVisit: string;
+ };
+}) {
+ const editor = useEditor({
+ extensions: [
+ ...baseExtensions,
+ Placeholder.configure({ placeholder: placeholder ?? "" }),
+ ],
+ content: value ?? "",
+ contentType: "markdown",
+ immediatelyRender: false,
+ editorProps: {
+ attributes: {
+ id: id ?? "",
+ // Lets InputGroup's focus-within ring key off the editable element.
+ "data-slot": "input-group-control",
+ "aria-labelledby": ariaLabelledBy ?? "",
+ class: cn(
+ "min-h-24 w-full px-2.5 py-2 text-sm outline-none",
+ "[&_a]:text-link [&_a]:underline",
+ "[&_ol]:list-decimal [&_ol]:pl-5 [&_ul]:list-disc [&_ul]:pl-5",
+ "[&_p]:leading-relaxed",
+ "[&_.is-editor-empty:first-child]:before:pointer-events-none [&_.is-editor-empty:first-child]:before:float-left [&_.is-editor-empty:first-child]:before:h-0 [&_.is-editor-empty:first-child]:before:text-muted-foreground [&_.is-editor-empty:first-child]:before:content-[attr(data-placeholder)]",
+ ),
+ },
+ },
+ onUpdate: ({ editor }) => {
+ onChange?.(editor.getMarkdown());
+ },
+ onBlur: () => {
+ onBlur?.();
+ },
+ });
+
+ React.useEffect(() => {
+ if (!editor) return;
+ if (value !== undefined && value !== editor.getMarkdown()) {
+ editor.commands.setContent(value, { contentType: "markdown" });
+ }
+ }, [editor, value]);
+
+ if (!editor) {
+ return (
+ <InputGroup className={cn("min-h-32 flex-col", className)}>
+ <InputGroupAddon align="block-start" />
+ </InputGroup>
+ );
+ }
+
+ return (
+ <InputGroup className={cn("flex-col items-stretch", className)}>
+ <InputGroupAddon align="block-start">
+ <Toolbar editor={editor} labels={labels} />
+ </InputGroupAddon>
+ <EditorContent editor={editor} />
+ {maxLength ? (
+ <InputGroupAddon align="block-end" className="justify-end">
+ <CharacterCount editor={editor} maxLength={maxLength} />
+ </InputGroupAddon>
+ ) : null}
+ <LinkBubbleMenu editor={editor} labels={labels} />
+ </InputGroup>
+ );
+}
+
+function CharacterCount({
+ editor,
+ maxLength,
+}: {
+ editor: TiptapEditor;
+ maxLength: number;
+}) {
+ const { length } = useEditorState({
+ editor,
+ // Count the Markdown source — that's what the cap (and the iCal
+ // DESCRIPTION) sees, so `**bold**` costs more than its rendered text.
+ selector: (ctx) => ({ length: ctx.editor.getMarkdown().length }),
+ });
+
+ const over = length > maxLength;
+ // Stay out of the way until the user is within ~15% of the cap.
+ if (!over && length < maxLength * 0.85) {
+ return null;
+ }
+
+ return (
+ <span
+ aria-live="polite"
+ className={cn(
+ "text-xs tabular-nums",
+ over ? "font-medium text-destructive" : "text-muted-foreground",
+ )}
+ >
+ {length}/{maxLength}
+ </span>
+ );
+}
+
+function LinkBubbleMenu({
+ editor,
+ labels,
+}: {
+ editor: TiptapEditor;
+ labels: React.ComponentProps<typeof RichTextEditor>["labels"];
+}) {
+ const state = useEditorState({
+ editor,
+ selector: (ctx) => ({
+ href: (ctx.editor.getAttributes("link").href as string | undefined) ?? "",
+ }),
+ });
+
+ return (
+ <BubbleMenu
+ editor={editor}
+ pluginKey="linkBubbleMenu"
+ // Show only when the caret sits inside a link — not while dragging a
+ // selection across other text.
+ shouldShow={({ editor }) => editor.isEditable && editor.isActive("link")}
+ options={{ placement: "bottom", offset: 8 }}
+ >
+ {state.href ? (
+ <a
+ href={state.href}
+ target="_blank"
+ rel="noopener noreferrer"
+ title={labels.linkVisit}
+ className="flex max-w-80 items-center gap-2 rounded-lg border border-input bg-popover px-2.5 py-1.5 text-sm shadow-md"
+ >
+ <span className="truncate text-link underline">{state.href}</span>
+ <ExternalLinkIcon className="size-3.5 shrink-0 text-muted-foreground" />
+ </a>
+ ) : null}
+ </BubbleMenu>
+ );
+}
+
+function Toolbar({
+ editor,
+ labels,
+}: {
+ editor: TiptapEditor;
+ labels: React.ComponentProps<typeof RichTextEditor>["labels"];
+}) {
+ const state = useEditorState({
+ editor,
+ selector: (ctx) => ({
+ isBold: ctx.editor.isActive("bold"),
+ isItalic: ctx.editor.isActive("italic"),
+ isLink: ctx.editor.isActive("link"),
+ isBulletList: ctx.editor.isActive("bulletList"),
+ isOrderedList: ctx.editor.isActive("orderedList"),
+ }),
+ });
+
+ return (
+ <div className="flex flex-wrap items-center gap-0.5">
+ <ToolbarButton
+ label={labels.bold}
+ active={state.isBold}
+ onClick={() => editor.chain().focus().toggleBold().run()}
+ >
+ <BoldIcon />
+ </ToolbarButton>
+ <ToolbarButton
+ label={labels.italic}
+ active={state.isItalic}
+ onClick={() => editor.chain().focus().toggleItalic().run()}
+ >
+ <ItalicIcon />
+ </ToolbarButton>
+ <LinkButton editor={editor} active={state.isLink} labels={labels} />
+ <ToolbarButton
+ label={labels.bulletList}
+ active={state.isBulletList}
+ onClick={() => editor.chain().focus().toggleBulletList().run()}
+ >
+ <ListIcon />
+ </ToolbarButton>
+ <ToolbarButton
+ label={labels.numberedList}
+ active={state.isOrderedList}
+ onClick={() => editor.chain().focus().toggleOrderedList().run()}
+ >
+ <ListOrderedIcon />
+ </ToolbarButton>
+ </div>
+ );
+}
+
+function ToolbarButton({
+ label,
+ active,
+ onClick,
+ children,
+}: {
+ label: string;
+ active?: boolean;
+ onClick: () => void;
+ children: React.ReactNode;
+}) {
+ return (
+ <InputGroupButton
+ size="icon-sm"
+ aria-label={label}
+ aria-pressed={active}
+ title={label}
+ data-state={active ? "open" : undefined}
+ onMouseDown={(e) => {
+ // Keep editor selection while clicking the toolbar.
+ e.preventDefault();
+ }}
+ onClick={onClick}
+ >
+ {children}
+ </InputGroupButton>
+ );
+}
+
+function LinkButton({
+ editor,
+ active,
+ labels,
+}: {
+ editor: TiptapEditor;
+ active?: boolean;
+ labels: React.ComponentProps<typeof RichTextEditor>["labels"];
+}) {
+ const [open, setOpen] = React.useState(false);
+ const [url, setUrl] = React.useState("");
+
+ const openPopover = () => {
+ setUrl(editor.getAttributes("link").href ?? "");
+ setOpen(true);
+ };
+
+ const apply = () => {
+ const trimmed = url.trim();
+ if (!trimmed) {
+ editor.chain().focus().extendMarkRange("link").unsetLink().run();
+ setOpen(false);
+ return;
+ }
+ // setLink runs the link extension's isAllowedUri check and returns false for
+ // rejected schemes (javascript:, data:, …). Keep the popover open on failure
+ // so the typed value isn't silently lost.
+ const ok = editor
+ .chain()
+ .focus()
+ .extendMarkRange("link")
+ .setLink({ href: trimmed })
+ .run();
+ if (ok) {
+ setOpen(false);
+ }
+ };
+
+ const remove = () => {
+ editor.chain().focus().extendMarkRange("link").unsetLink().run();
+ setOpen(false);
+ };
+
+ return (
+ <Popover open={open} onOpenChange={setOpen}>
+ <PopoverTrigger
+ render={
+ <InputGroupButton
+ size="icon-sm"
+ aria-label={labels.link}
+ aria-pressed={active}
+ title={labels.link}
+ data-state={active ? "open" : undefined}
+ onMouseDown={(e) => e.preventDefault()}
+ onClick={openPopover}
+ >
+ <LinkIcon />
+ </InputGroupButton>
+ }
+ />
+ <PopoverContent className="w-80 p-2" align="start">
+ <form
+ onSubmit={(e) => {
+ e.preventDefault();
+ apply();
+ }}
+ >
+ <InputGroup>
+ {/* biome-ignore lint/a11y/noAutofocus: intentional focus when opening the link editor */}
+ <InputGroupInput
+ autoFocus
+ value={url}
+ onChange={(e) => setUrl(e.target.value)}
+ placeholder={labels.linkPlaceholder}
+ />
+ <InputGroupAddon align="inline-end">
+ <InputGroupButton type="submit" variant="default" size="sm">
+ {labels.linkApply}
+ </InputGroupButton>
+ </InputGroupAddon>
+ </InputGroup>
+ </form>
+ {active ? (
+ <Button
+ type="button"
+ variant="ghost"
+ size="sm"
+ className="mt-1 w-full justify-start text-muted-foreground"
+ onClick={remove}
+ >
+ {labels.linkRemove}
+ </Button>
+ ) : null}
+ </PopoverContent>
+ </Popover>
+ );
+}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 76820ad38..a6ecec156 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -362,7 +362,7 @@ importers:
version: 3.0.5
linkify-react:
specifier: ^4.3.2
lodash:
specifier: ^4.17.21
version: 4.17.23
@@ -770,6 +770,24 @@ importers:
'@react-stately/color':
specifier: ^3.9.5
version: 3.9.5([email protected])
+ '@tiptap/extension-link':
+ specifier: 3.27.3
+ version: 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])
+ '@tiptap/extension-placeholder':
+ specifier: 3.27.3
+ version: 3.27.3(@tiptap/[email protected](@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected]))
+ '@tiptap/markdown':
+ specifier: 3.27.3
+ version: 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])
+ '@tiptap/pm':
+ specifier: 3.27.3
+ version: 3.27.3
+ '@tiptap/react':
+ specifier: 3.27.3
+ '@tiptap/starter-kit':
+ specifier: 3.27.3
+ version: 3.27.3
class-variance-authority:
specifier: ^0.7.1
version: 0.7.1
@@ -5595,6 +5613,166 @@ packages:
peerDependencies:
'@testing-library/dom': '>=7.21.4'
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-TJj5929M96C1KlH796wS8MywfHDh49RhmakOyzyMMc9pFmRj9UXi1gj0TCXgsZtjEOG7B+m/DRvNOvnuvR9kmg==}
+ peerDependencies:
+ '@tiptap/pm': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-VGoVMcqcGkkoduzEqQ70ZK5OOHBDn5iYeHJSgkvNoSHzYHl0CaKoWxoDKJjSWC5DAM4mBU+tXTlsiUp3evRMfA==}
+ peerDependencies:
+ '@tiptap/core': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-pchbycFppBqBmvk+OxrQLIPZLNd3rNbcm7zOa+OTjluphpAcsJ6AmHBmiRhJUYWitV6/SA+0nujcaWxBp5hNcQ==}
+ peerDependencies:
+ '@tiptap/core': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-PKSM9g8BXzO0Lxm2gOin7FAFvxO6T0QvlXTXVke/GJn/sR1tEz7w5ybsvweytUPmSliUc601pfIUOHKEhIVC2Q==}
+ peerDependencies:
+ '@tiptap/core': 3.27.3
+ '@tiptap/pm': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-owQW6mcgnYgQU1z5BqmslcjZFBUm1SGM/Ax++4R6XelIt/7ol6uSTjzjAzum+ASW7UlBbuJHuSgRjl8cA+RGkg==}
+ peerDependencies:
+ '@tiptap/extension-list': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-3CVnzkpGoqqI5KaXI9l9PMwLkx34SYY63tpeo0I0QjDk4LU+JTAQDTPJFSwB4zTsHZ7ZFMU0jjasFOZ1kZRVgw==}
+ peerDependencies:
+ '@tiptap/core': 3.27.3
+ '@tiptap/pm': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-T7JF10Y3k7fyVujXXLVubdUh7fctgBUoiuxbvjotpltg1U/mPbOcT0UW/uif9j3H8TFvAwNApVw3x8bwwFUakA==}
+ peerDependencies:
+ '@tiptap/core': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-PR25MRv56Nm4ETVLwA8nAh/0RrVdvD4D2nxnAC8kUkxz1WOYDaqTfPqqEeSWDoUUTUp1I1xzDkD4x0gEnAlmZA==}
+ peerDependencies:
+ '@tiptap/core': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-XsL0Ziual+ynXyx5JgLb0KIOShlMN3MW7+GQvf9PGRb1vOB7IOTRFDxMPrxDWcFIZ6WWMWSrbkCLOKHStt1BWg==}
+ peerDependencies:
+ '@tiptap/extensions': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-qL+g1Z6MqZvYG4mHTPwub9II2fWZY+2I5VFfV8fzqy1HchBOyY6Df0mRKDNb0bmjBdFabIXnswz3iqLx3mDTbw==}
+ peerDependencies:
+ '@floating-ui/dom': ^1.0.0
+ '@tiptap/core': 3.27.3
+ '@tiptap/pm': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-MVBqzwYrDOttkn2GOrvvKTDCymfSS2VGSKpahcKKhge5mweSDiqko2X1vBDnMF8aVW3WxIFfDMmO4VMmh8HDZA==}
+ peerDependencies:
+ '@tiptap/extensions': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-cySObJITR2CRrWII87mI2LJ12wEETTnxt2p1vvC6ZtUmKnB50fOu+ux8ZEt6KYNocIOtrEZthNFzTOx7R7UtrQ==}
+ peerDependencies:
+ '@tiptap/core': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-QHXnsNic6iId8pnsFZ8z4PkX5L+HCHa/D7rAi3nNWtPlSIAOxo4nKrALcB5/tHmY+XL8kEXKH3nsNLNEDLCYPg==}
+ peerDependencies:
+ '@tiptap/core': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-sNCuo0+Q001B5XTVWY+ULpWXQqtBNRmAqXxAexZl44bx3rDqHG8OzjwT4EM0LIj2+BYVbdqwaJ1vfQbZVEEbig==}
+ peerDependencies:
+ '@tiptap/core': 3.27.3
+ '@tiptap/pm': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-7VpVi2vn8kGFAc/HLrt96J/E6+LXOGKn8xLhJS863t150yLIG3EPQLA1h+G5O6eo+/w+9YokvJAAJoeDihj1Jg==}
+ peerDependencies:
+ '@tiptap/core': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-iXmu1tJ/3vP60c9d+zfO3+X64vod2EyBrM1qeufecAtWA6t0bT9tYeka0Zq6qDRGsZK5zViO9F2lsY7eHXiYuA==}
+ peerDependencies:
+ '@tiptap/core': 3.27.3
+ '@tiptap/pm': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-UddhVaQ7+V9IfQVVE8AJLNzSmyaaNpZPQsoPQxFNlJyOFxD6RwSTT8L4rb/TwbUctxSFWpyd1J7exzf33Ony/g==}
+ peerDependencies:
+ '@tiptap/extension-list': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-GZPVg4QCFm41yTMPEPeTlH2odNeQwRuWHY/pt3pI5LsfipQ4kDBv6h9we928vJQUnU2Gg9Y3cL5iRbmXIWWTUA==}
+ peerDependencies:
+ '@tiptap/extension-list': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-52rcaSzYjtVGUrNkdB8k1Bw/rId2lBirrWMvmnBLsieoeFd8zo8ow5zkwV057BYSgWXfnMAV7GOpDyq2IoSD9A==}
+ peerDependencies:
+ '@tiptap/core': 3.27.3
+ '@tiptap/pm': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-oHYoE65WfRSM5tCcXi8MtQmzPxz83E2qw0pa2yHBKwr9xCCQUu8vJHJE+EJGduWdaNImv43+6/6kVMeYYbXRKg==}
+ peerDependencies:
+ '@tiptap/extension-list': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-G5XPCN7lm0nULYPelJC2eUbKbt1q97j67e/HSWxwMYEXhceec5eNAtVfpDCRyXNO9osyBi2kXqLv/IQtxbch9A==}
+ peerDependencies:
+ '@tiptap/core': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-Y43dGaN3rA0oU4CWmXkZ2idjZjrxPX9oy0zZL92EgXOguhAUToBs0dIxRG5ZanYX9A8kKKWPlfeRFlBMtRhKvg==}
+ peerDependencies:
+ '@tiptap/extensions': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-dp6Rs3I4zLVJPvAw2Q9yrNuYKcX5LTONH3/oyULvGsrqq5DKz7pqscfwhwnDSzrgm/3aCz6B9r1BVHlYI/DXlA==}
+ peerDependencies:
+ '@tiptap/core': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-wSatZ/bop0pleeC18nF90zvWWEoRe/ewZncvm8LjcMrXwq41kTEs3j7nZflMYAh7X8fZvu00UIMeEyCNJl+5Yg==}
+ peerDependencies:
+ '@tiptap/core': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-YH7ka/Rp7ZwlzTuQCcs0OZ4CMSx/P/MzbseQKxKebEIZreWaKMZAaED97Fnu0dA66VlreD4/1C7xHJy84ovamg==}
+ peerDependencies:
+ '@tiptap/core': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-IA2QKUVJgzUPEhhkUfr6P5u5GFVfhiApiEaaHXBz07saL2c4HNoVs2RC18QlZDCtLNKrPR1mUScr72u7uYs+YQ==}
+ peerDependencies:
+ '@tiptap/core': 3.27.3
+ '@tiptap/pm': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-+hNpPsJHqiuirpaF7LD4tZPEFqCe3Uu3nRE8krtrP3zWYmWnHnfQNg+zlvrVNR3pN9S3oh4WC96Wg/otYDJHdA==}
+ peerDependencies:
+ '@tiptap/core': 3.27.3
+ '@tiptap/pm': 3.27.3
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-ppiG57RxM3HSHHgcHT0hP6Ib4P56Sd5itxdV4w0hIGHKPGyLLKiAkYp+htIHa9T7IvjMdaqxIlsfyV3ZKsS1sw==}
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-lanXxMScw/LevbRFuFw5MoQJ1grmHUDszwph2VIk4l2U5e/EDIw3rr4CeDME6Z4isVReD6zccMFVShkHqsv+jg==}
+ peerDependencies:
+ '@tiptap/core': 3.27.3
+ '@tiptap/pm': 3.27.3
+ '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0
+ '@types/react-dom': ^17.0.0 || ^18.0.0 || ^19.0.0
+ react: ^17.0.0 || ^18.0.0 || ^19.0.0
+ react-dom: ^17.0.0 || ^18.0.0 || ^19.0.0
+
+ '@tiptap/[email protected]':
+ resolution: {integrity: sha512-xX3baFqiC30skntdhxUUvyJo755ON9c1pE83+2Wiq2g+Qnffg9knUuLCZStHoZZ318yB0aBsKAMvHWLtYDo8AA==}
+
'@tootallnate/[email protected]':
resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==}
@@ -5849,6 +6027,9 @@ packages:
resolution: {integrity: sha512-wkXrVzX5yoqLnndOwFsieJA7oKM8cNkOKJtf/3vVGSUFkWDKZvFHpIl9Pvqb/T9UsawBBFMTTD8xu7sK5MWuvg==}
+ '@types/[email protected]':
+ resolution: {integrity: sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==}
+
resolution: {integrity: sha512-D1XC7WK8K+zZEveUPY+cf4+kgauk8N4eHr/XIHXGlGYkHLud6hK9lYfZk1ry1TNh798cZUCgb6MqGEG8DkJt6Q==}
@@ -7377,6 +7558,10 @@ packages:
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
+ resolution: {integrity: sha512-DjlFSM5Pk9cGcL0q5QXl66eGzx0N6szNgaswwc5ZphlBohjTVJSnGgI+rJVOgOi65qUoQnDZN4nDqi33udtydQ==}
+ engines: {node: '>=6.0.0'}
+
resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==}
@@ -8493,8 +8678,8 @@ packages:
linkifyjs: ^4.0.0
react: '>= 15.0.0'
- resolution: {integrity: sha512-NT1CJtq3hHIreOianA8aSXn6Cw0JzYOuDQbOrSPe7gqFnCpKP++MQe3ODgO3oh2GJFORkAAdqredOa60z63GbA==}
+ resolution: {integrity: sha512-P8aEP5U/D1/IlTY2OeYsErdwh9bGuLE30NcXtKEjgdHcahveQoQwM2yZNsioQHsWFz0P7KKudisbrzCgR0sDHg==}
resolution: {integrity: sha512-lDIj4RnYmK7/kXMya+qJsmkRFkGolciXjrsZ6PC25GdTfWOAWetR0ZbsNXRAj1EHHImRSalc+whZFg56F5DVow==}
@@ -8603,6 +8788,11 @@ packages:
engines: {node: '>= 18'}
hasBin: true
+ resolution: {integrity: sha512-gB0gkNafnonOw0obSTEGZTT86IuhILt2Wfx0mWH/1Au83kybTayroZ/V6nS25mN7u8ASy+5fMhgB3XPNrOZdmA==}
+ engines: {node: '>= 20'}
+ hasBin: true
+
resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}
engines: {node: '>= 0.4'}
@@ -9206,6 +9396,9 @@ packages:
resolution: {integrity: sha512-84cglkRILFxdtA8hAvLNdMrtBpPNBTrQ9/ulg0FA7xLMnD6mifv+enAIeRmvtv+WgdCE+LPGOfQmtJRrVaIVhQ==}
engines: {node: '>=20'}
+ resolution: {integrity: sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g==}
+
resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==}
engines: {node: '>= 0.4'}
@@ -9586,6 +9779,45 @@ packages:
resolution: {integrity: sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==}
+ resolution: {integrity: sha512-96WBLhOaYhJ+kPhLg3uW359Tz6I/MfcrQfL4EGv4SrcqKEMC1gmoGrXHecPE8eOwTVCJ4IwgfzM8fFad25wNfw==}
+
+ resolution: {integrity: sha512-rT7qZnQtx5c0/y/KlYaGvtG411S97UaL6gdp6RIZ23DLHanMYLyfGBV5DtSnZdthQql7W+lEVbpSfwtO8T+L2w==}
+
+ resolution: {integrity: sha512-FoYbsJR8gK+DGlqhNoE29Loa38eIZPzQRIb1VMaDNBoo4OLP6vVof/jR8qFY/6XvUd6Dhug8MDCHl2a/h8RTfQ==}
+
+ resolution: {integrity: sha512-pMdYaEnjNMSwl11yjEGtgTmLkR08m/Vl+Jj443167p9eB3HVQKhYCc4gmHVDsLPODfZfjr/MmirsdyZziXbQKw==}
+
+ resolution: {integrity: sha512-zlzTiH01eKA55UAf1MEjtssJeHnGxO0j4K4Dpx+gnmX9n+SHNlDqI2oO1Kv1iPN5B1dm5fsljCfqKF9nFL6HRg==}
+
+ resolution: {integrity: sha512-7wj4uMjKaXWAQ1CDgxNzNtR9AlsuwzHfdFH1ygEHA2KHF2DOEaXl1CJfNPAKCg9qNEh4rum975QLaCiQPyY6Fw==}
+
+ resolution: {integrity: sha512-4HucRlpiLd1IPQQXNqeo81BGtkY8Ai5smHhKW9jjPKRc2wQIxksg7Hl1tTI2IfT2B/LgX6bfYvXxEpJl7aKYKw==}
+
+ resolution: {integrity: sha512-QWg9RhnpLlogAmp3p96uEFrE5txQpFynd4vhBAELkwgOCWQs/X0yCzB3/hrHqiPwf91RG5KyWq6553zs9JqIOQ==}
+
+ resolution: {integrity: sha512-927lFx/uwyQaGwJxLWCZRkjXG0p48KpMj6ueoYiu4JX05GGuGcgzAy62dfiV8eFZftgyBUvLx76RsMe20fJl+Q==}
+
+ resolution: {integrity: sha512-6jiYHH2CIGbCfnxdHbXZ12gySFY/fz/ulZE333G6bPqIZ4F+TXo9ifiR86nAHpWnfoNjOb3o5ESi7J8Uz1jXHw==}
+
+ resolution: {integrity: sha512-V/0cDCsHKHe/tfWkeCmthNUcEp1IVO3p6vwN8XtwE9PZQLAZJigbw3QoraAdfJPir4NKJtNvOB8oYGKRl+t0Dw==}
+
+ resolution: {integrity: sha512-GxboyN4AMIsoHNtz5uf2r2Ru551i5hWeCMD6E2Ib4Eogqoub0NflniaBPVQ4MrGE5yZ8JV9tUHg9qcZTTrcN4w==}
+
+ resolution: {integrity: sha512-rRqzZnRgkyh69XoOMrfFJHwauHscLBmHbq772kwbic1ymQAM8gXjzEbJse5j1ep2UO2HRIAQL0bY3kZ/RoqjVw==}
+
resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==}
engines: {node: '>= 0.10'}
@@ -10038,6 +10270,9 @@ packages:
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
hasBin: true
+ resolution: {integrity: sha512-UT5EDe2cu2E/6O4igUr5PSFs23nvvukicWHx6GnOPlHAiiYbzNuCRQCuiUdHJQcqKalLKlrYJnjY0ySGsXNQXQ==}
+
resolution: {integrity: sha512-iFE4hLDuloSWcD7mjdCDhx2bKcIsYbtOTpfH5MHHLSKMOUyjqQXTeZVa289uuwEGEKFoE/BAPbhaU4B774nceg==}
@@ -11036,6 +11271,9 @@ packages:
resolution: {integrity: sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==}
engines: {node: '>=0.10.0'}
+ resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==}
+
resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==}
engines: {node: '>=18'}
@@ -17280,6 +17518,188 @@ snapshots:
dependencies:
'@testing-library/dom': 10.4.1
+ dependencies:
+ '@tiptap/pm': 3.27.3
+
+ dependencies:
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+
+ dependencies:
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+
+ dependencies:
+ '@floating-ui/dom': 1.7.5
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+ '@tiptap/pm': 3.27.3
+ optional: true
+
+ dependencies:
+ '@tiptap/extension-list': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])
+
+ dependencies:
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+ '@tiptap/pm': 3.27.3
+
+ dependencies:
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+
+ dependencies:
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+
+ dependencies:
+ '@tiptap/extensions': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])
+
+ dependencies:
+ '@floating-ui/dom': 1.7.5
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+ '@tiptap/pm': 3.27.3
+ optional: true
+
+ dependencies:
+ '@tiptap/extensions': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])
+
+ dependencies:
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+
+ dependencies:
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+
+ dependencies:
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+ '@tiptap/pm': 3.27.3
+
+ dependencies:
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+
+ dependencies:
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+ '@tiptap/pm': 3.27.3
+ linkifyjs: 4.3.3
+
+ dependencies:
+ '@tiptap/extension-list': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])
+
+ dependencies:
+ '@tiptap/extension-list': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])
+
+ dependencies:
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+ '@tiptap/pm': 3.27.3
+
+ dependencies:
+ '@tiptap/extension-list': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])
+
+ dependencies:
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+
+ dependencies:
+ '@tiptap/extensions': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])
+
+ dependencies:
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+
+ dependencies:
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+
+ dependencies:
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+
+ dependencies:
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+ '@tiptap/pm': 3.27.3
+
+ dependencies:
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+ '@tiptap/pm': 3.27.3
+ marked: 17.0.6
+
+ '@tiptap/[email protected]':
+ dependencies:
+ prosemirror-changeset: 2.4.1
+ prosemirror-commands: 1.7.1
+ prosemirror-dropcursor: 1.8.3
+ prosemirror-gapcursor: 1.4.1
+ prosemirror-history: 1.5.0
+ prosemirror-inputrules: 1.5.1
+ prosemirror-keymap: 1.2.3
+ prosemirror-model: 1.25.11
+ prosemirror-schema-list: 1.5.1
+ prosemirror-state: 1.4.4
+ prosemirror-tables: 1.8.5
+ prosemirror-transform: 1.12.0
+ prosemirror-view: 1.42.1
+
+ dependencies:
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+ '@tiptap/pm': 3.27.3
+ '@types/react': 19.2.13
+ '@types/react-dom': 19.2.3(@types/[email protected])
+ '@types/use-sync-external-store': 0.0.6
+ fast-equals: 5.4.1
+ react: 19.2.6
+ react-dom: 19.2.6([email protected])
+ use-sync-external-store: 1.6.0([email protected])
+ optionalDependencies:
+ '@tiptap/extension-bubble-menu': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])
+ '@tiptap/extension-floating-menu': 3.27.3(@floating-ui/[email protected])(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])
+ transitivePeerDependencies:
+ - '@floating-ui/dom'
+
+ '@tiptap/[email protected]':
+ dependencies:
+ '@tiptap/core': 3.27.3(@tiptap/[email protected])
+ '@tiptap/extension-blockquote': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))
+ '@tiptap/extension-bold': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))
+ '@tiptap/extension-bullet-list': 3.27.3(@tiptap/[email protected](@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected]))
+ '@tiptap/extension-code': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))
+ '@tiptap/extension-code-block': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])
+ '@tiptap/extension-document': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))
+ '@tiptap/extension-dropcursor': 3.27.3(@tiptap/[email protected](@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected]))
+ '@tiptap/extension-gapcursor': 3.27.3(@tiptap/[email protected](@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected]))
+ '@tiptap/extension-hard-break': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))
+ '@tiptap/extension-heading': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))
+ '@tiptap/extension-horizontal-rule': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])
+ '@tiptap/extension-italic': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))
+ '@tiptap/extension-link': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])
+ '@tiptap/extension-list': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])
+ '@tiptap/extension-list-item': 3.27.3(@tiptap/[email protected](@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected]))
+ '@tiptap/extension-list-keymap': 3.27.3(@tiptap/[email protected](@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected]))
+ '@tiptap/extension-ordered-list': 3.27.3(@tiptap/[email protected](@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected]))
+ '@tiptap/extension-paragraph': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))
+ '@tiptap/extension-strike': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))
+ '@tiptap/extension-text': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))
+ '@tiptap/extension-underline': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))
+ '@tiptap/extensions': 3.27.3(@tiptap/[email protected](@tiptap/[email protected]))(@tiptap/[email protected])
+ '@tiptap/pm': 3.27.3
+
'@tootallnate/[email protected]': {}
@@ -17559,6 +17979,8 @@ snapshots:
'@types/[email protected]': {}
+ '@types/[email protected]': {}
+
'@types/[email protected]': {}
@@ -19221,6 +19643,8 @@ snapshots:
+
@@ -20529,12 +20953,12 @@ snapshots:
dependencies:
- linkifyjs: 4.3.2
+ linkifyjs: 4.3.3
react: 19.2.6
dependencies:
@@ -20632,6 +21056,8 @@ snapshots:
+
@@ -21547,6 +21973,8 @@ snapshots:
stdin-discarder: 0.3.2
string-width: 8.2.0
+
dependencies:
get-intrinsic: 1.3.0
@@ -21933,6 +22361,80 @@ snapshots:
+ dependencies:
+ prosemirror-transform: 1.12.0
+
+ dependencies:
+ prosemirror-model: 1.25.11
+ prosemirror-state: 1.4.4
+ prosemirror-transform: 1.12.0
+
+ dependencies:
+ prosemirror-state: 1.4.4
+ prosemirror-transform: 1.12.0
+ prosemirror-view: 1.42.1
+
+ dependencies:
+ prosemirror-keymap: 1.2.3
+ prosemirror-model: 1.25.11
+ prosemirror-state: 1.4.4
+ prosemirror-view: 1.42.1
+
+ dependencies:
+ prosemirror-state: 1.4.4
+ prosemirror-transform: 1.12.0
+ prosemirror-view: 1.42.1
+ rope-sequence: 1.3.4
+
+ dependencies:
+ prosemirror-state: 1.4.4
+ prosemirror-transform: 1.12.0
+
+ dependencies:
+ prosemirror-state: 1.4.4
+ w3c-keyname: 2.2.8
+
+ dependencies:
+ orderedmap: 2.1.1
+
+ dependencies:
+ prosemirror-model: 1.25.11
+ prosemirror-state: 1.4.4
+ prosemirror-transform: 1.12.0
+
+ dependencies:
+ prosemirror-model: 1.25.11
+ prosemirror-transform: 1.12.0
+ prosemirror-view: 1.42.1
+
+ dependencies:
+ prosemirror-keymap: 1.2.3
+ prosemirror-model: 1.25.11
+ prosemirror-state: 1.4.4
+ prosemirror-transform: 1.12.0
+ prosemirror-view: 1.42.1
+
+ dependencies:
+ prosemirror-model: 1.25.11
+
+ dependencies:
+ prosemirror-model: 1.25.11
+ prosemirror-state: 1.4.4
+ prosemirror-transform: 1.12.0
+
dependencies:
forwarded: 0.2.0
@@ -22714,6 +23216,8 @@ snapshots:
'@rollup/rollup-win32-x64-msvc': 4.57.1
fsevents: 2.3.3
+
@@ -23840,6 +24344,8 @@ snapshots:
+
dependencies:
xml-name-validator: 5.0.0