Fix button roundtrip in editor, alignment persistence, and test email rendering
This commit is contained in:
@@ -39,6 +39,7 @@ export const ButtonExtension = Node.create<ButtonOptions>({
|
||||
return [
|
||||
{
|
||||
tag: 'a[data-button]',
|
||||
priority: 100, // Higher priority than Link extension (default 50)
|
||||
getAttrs: (node: HTMLElement) => ({
|
||||
text: node.getAttribute('data-text') || node.textContent || 'Click Here',
|
||||
href: node.getAttribute('data-href') || node.getAttribute('href') || '#',
|
||||
@@ -47,6 +48,7 @@ export const ButtonExtension = Node.create<ButtonOptions>({
|
||||
},
|
||||
{
|
||||
tag: 'a.button',
|
||||
priority: 100,
|
||||
getAttrs: (node: HTMLElement) => ({
|
||||
text: node.textContent || 'Click Here',
|
||||
href: node.getAttribute('href') || '#',
|
||||
@@ -55,6 +57,7 @@ export const ButtonExtension = Node.create<ButtonOptions>({
|
||||
},
|
||||
{
|
||||
tag: 'a.button-outline',
|
||||
priority: 100,
|
||||
getAttrs: (node: HTMLElement) => ({
|
||||
text: node.textContent || 'Click Here',
|
||||
href: node.getAttribute('href') || '#',
|
||||
|
||||
Reference in New Issue
Block a user