From c0e631f875c7531dc6cbc709cec92a3e32ff8cb4 Mon Sep 17 00:00:00 2001 From: Nick Perez Date: Wed, 7 Aug 2024 15:39:49 +0200 Subject: [PATCH] fix: bump priority of text-style extension fixes #4742 (#5457) --- .changeset/loud-rockets-film.md | 5 +++++ packages/core/src/Extension.ts | 4 ++-- packages/core/src/Mark.ts | 4 ++-- packages/core/src/Node.ts | 4 ++-- packages/extension-text-style/src/text-style.ts | 2 ++ 5 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 .changeset/loud-rockets-film.md diff --git a/.changeset/loud-rockets-film.md b/.changeset/loud-rockets-film.md new file mode 100644 index 000000000..8387cc94f --- /dev/null +++ b/.changeset/loud-rockets-film.md @@ -0,0 +1,5 @@ +--- +"@tiptap/extension-text-style": patch +--- + +Give text-style extension a higher priority to have colors apply to things like underlines and strikethroughs diff --git a/packages/core/src/Extension.ts b/packages/core/src/Extension.ts index 0bcd9004d..4da90d6ee 100644 --- a/packages/core/src/Extension.ts +++ b/packages/core/src/Extension.ts @@ -34,8 +34,8 @@ declare module '@tiptap/core' { /** * The priority of your extension. The higher, the later it will be called * and will take precedence over other extensions with a lower priority. - * @default 1000 - * @example 1001 + * @default 100 + * @example 101 */ priority?: number diff --git a/packages/core/src/Mark.ts b/packages/core/src/Mark.ts index e731d2465..9a09508c0 100644 --- a/packages/core/src/Mark.ts +++ b/packages/core/src/Mark.ts @@ -37,8 +37,8 @@ declare module '@tiptap/core' { /** * The priority of your extension. The higher, the later it will be called * and will take precedence over other extensions with a lower priority. - * @default 1000 - * @example 1001 + * @default 100 + * @example 101 */ priority?: number diff --git a/packages/core/src/Node.ts b/packages/core/src/Node.ts index ce21411ca..8a261e188 100644 --- a/packages/core/src/Node.ts +++ b/packages/core/src/Node.ts @@ -38,8 +38,8 @@ declare module '@tiptap/core' { /** * The priority of your extension. The higher, the later it will be called * and will take precedence over other extensions with a lower priority. - * @default 1000 - * @example 1001 + * @default 100 + * @example 101 */ priority?: number diff --git a/packages/extension-text-style/src/text-style.ts b/packages/extension-text-style/src/text-style.ts index 90c30d4d7..80c0da06b 100644 --- a/packages/extension-text-style/src/text-style.ts +++ b/packages/extension-text-style/src/text-style.ts @@ -33,6 +33,8 @@ declare module '@tiptap/core' { export const TextStyle = Mark.create({ name: 'textStyle', + priority: 101, + addOptions() { return { HTMLAttributes: {},