diff --git a/packages/extension-strike/src/strike.ts b/packages/extension-strike/src/strike.ts index 48baac08c..0f8134eb0 100644 --- a/packages/extension-strike/src/strike.ts +++ b/packages/extension-strike/src/strike.ts @@ -53,7 +53,9 @@ export const Strike = Mark.create({ tag: 'strike', }, { - style: 'text-decoration=line-through', + style: 'text-decoration', + consuming: false, + getAttrs: style => ((style as string).includes('line-through') ? {} : false), }, ] }, diff --git a/packages/extension-underline/src/underline.ts b/packages/extension-underline/src/underline.ts index 53630ab48..f9e9ee36c 100644 --- a/packages/extension-underline/src/underline.ts +++ b/packages/extension-underline/src/underline.ts @@ -38,7 +38,9 @@ export const Underline = Mark.create({ tag: 'u', }, { - style: 'text-decoration=underline', + style: 'text-decoration', + consuming: false, + getAttrs: style => ((style as string).includes('underline') ? {} : false), }, ] },