diff --git a/admin-spa/src/components/ui/tiptap-button-extension.ts b/admin-spa/src/components/ui/tiptap-button-extension.ts index a5e1666..fd44e1f 100644 --- a/admin-spa/src/components/ui/tiptap-button-extension.ts +++ b/admin-spa/src/components/ui/tiptap-button-extension.ts @@ -39,12 +39,27 @@ export const ButtonExtension = Node.create({ return [ { tag: 'a[data-button]', + getAttrs: (node: HTMLElement) => ({ + text: node.getAttribute('data-text') || node.textContent || 'Click Here', + href: node.getAttribute('data-href') || node.getAttribute('href') || '#', + style: node.getAttribute('data-style') || 'solid', + }), }, { tag: 'a.button', + getAttrs: (node: HTMLElement) => ({ + text: node.textContent || 'Click Here', + href: node.getAttribute('href') || '#', + style: 'solid', + }), }, { tag: 'a.button-outline', + getAttrs: (node: HTMLElement) => ({ + text: node.textContent || 'Click Here', + href: node.getAttribute('href') || '#', + style: 'outline', + }), }, ]; },