diff --git a/components/tiptap-editor.tsx b/components/tiptap-editor.tsx index f17c2d6..7034c68 100644 --- a/components/tiptap-editor.tsx +++ b/components/tiptap-editor.tsx @@ -35,6 +35,7 @@ export function TiptapEditor({ code: false, blockquote: false, horizontalRule: false, + link: false, }), Link.configure({ openOnClick: false, diff --git a/components/wizard/settings-editor.tsx b/components/wizard/settings-editor.tsx index def423d..f4edc25 100644 --- a/components/wizard/settings-editor.tsx +++ b/components/wizard/settings-editor.tsx @@ -420,18 +420,15 @@ export function SettingsEditor({ )} {setting.value ? "On" : "Off"} - ) : ( + ) : typeof setting.value === "number" ? ( { - const raw = e.target.value - const updated = - typeof setting.value === "number" - ? raw === "" - ? 0 - : Number(raw) - : raw + const cleaned = e.target.value.replace(/[^0-9]/g, "") + const updated = cleaned === "" ? 0 : Number(cleaned) updateSetting( cat.category, setting.title, @@ -440,6 +437,19 @@ export function SettingsEditor({ }} className="flex-1 min-w-0 px-3 py-1.5 rounded-md border border-border bg-text/5 text-text text-sm placeholder:text-text/40 outline-none focus:border-primary focus:ring-2 focus:ring-primary/50 transition-colors" /> + ) : ( + { + updateSetting( + cat.category, + setting.title, + e.target.value + ) + }} + className="flex-1 min-w-0 px-3 py-1.5 rounded-md border border-border bg-text/5 text-text text-sm placeholder:text-text/40 outline-none focus:border-primary focus:ring-2 focus:ring-primary/50 transition-colors" + /> )}