@tiptap/extension-color
Advanced tools
Comparing version 2.3.2 to 2.4.0
import '@tiptap/extension-text-style'; | ||
import { Extension } from '@tiptap/core'; | ||
/** | ||
* This extension allows you to color your text. | ||
* @see https://tiptap.dev/api/extensions/color | ||
*/ | ||
const Color = Extension.create({ | ||
@@ -5,0 +9,0 @@ name: 'color', |
@@ -7,2 +7,6 @@ (function (global, factory) { | ||
/** | ||
* This extension allows you to color your text. | ||
* @see https://tiptap.dev/api/extensions/color | ||
*/ | ||
const Color = core.Extension.create({ | ||
@@ -9,0 +13,0 @@ name: 'color', |
import '@tiptap/extension-text-style'; | ||
import { Extension } from '@tiptap/core'; | ||
export declare type ColorOptions = { | ||
/** | ||
* The types where the color can be applied | ||
* @default ['textStyle'] | ||
* @example ['heading', 'paragraph'] | ||
*/ | ||
types: string[]; | ||
@@ -11,2 +16,4 @@ }; | ||
* Set the text color | ||
* @param color The color to set | ||
* @example editor.commands.setColor('red') | ||
*/ | ||
@@ -16,2 +23,3 @@ setColor: (color: string) => ReturnType; | ||
* Unset the text color | ||
* @example editor.commands.unsetColor() | ||
*/ | ||
@@ -22,2 +30,6 @@ unsetColor: () => ReturnType; | ||
} | ||
/** | ||
* This extension allows you to color your text. | ||
* @see https://tiptap.dev/api/extensions/color | ||
*/ | ||
export declare const Color: Extension<ColorOptions, any>; |
{ | ||
"name": "@tiptap/extension-color", | ||
"description": "text color extension for tiptap", | ||
"version": "2.3.2", | ||
"version": "2.4.0", | ||
"homepage": "https://tiptap.dev", | ||
@@ -32,4 +32,4 @@ "keywords": [ | ||
"devDependencies": { | ||
"@tiptap/core": "^2.3.2", | ||
"@tiptap/extension-text-style": "^2.3.2" | ||
"@tiptap/core": "^2.4.0", | ||
"@tiptap/extension-text-style": "^2.4.0" | ||
}, | ||
@@ -36,0 +36,0 @@ "peerDependencies": { |
@@ -6,2 +6,7 @@ import '@tiptap/extension-text-style' | ||
export type ColorOptions = { | ||
/** | ||
* The types where the color can be applied | ||
* @default ['textStyle'] | ||
* @example ['heading', 'paragraph'] | ||
*/ | ||
types: string[], | ||
@@ -15,6 +20,10 @@ } | ||
* Set the text color | ||
* @param color The color to set | ||
* @example editor.commands.setColor('red') | ||
*/ | ||
setColor: (color: string) => ReturnType, | ||
/** | ||
* Unset the text color | ||
* @example editor.commands.unsetColor() | ||
*/ | ||
@@ -26,2 +35,6 @@ unsetColor: () => ReturnType, | ||
/** | ||
* This extension allows you to color your text. | ||
* @see https://tiptap.dev/api/extensions/color | ||
*/ | ||
export const Color = Extension.create<ColorOptions>({ | ||
@@ -28,0 +41,0 @@ name: 'color', |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20134
269502
278