@tiptap/extension-text-style
Advanced tools
Comparing version 2.0.0-alpha.10 to 2.0.0-alpha.11
@@ -6,2 +6,10 @@ # Change Log | ||
# [2.0.0-alpha.11](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-text-style@2.0.0-alpha.10...@tiptap/extension-text-style@2.0.0-alpha.11) (2021-02-16) | ||
**Note:** Version bump only for package @tiptap/extension-text-style | ||
# [2.0.0-alpha.10](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-text-style@2.0.0-alpha.9...@tiptap/extension-text-style@2.0.0-alpha.10) (2021-02-07) | ||
@@ -8,0 +16,0 @@ |
@@ -7,12 +7,12 @@ import { Command, Mark } from '@tiptap/core'; | ||
} | ||
export declare const TextStyle: Mark<TextStyleOptions, { | ||
/** | ||
* Remove spans without inline style attributes. | ||
*/ | ||
removeEmptyTextStyle: () => Command; | ||
}>; | ||
declare module '@tiptap/core' { | ||
interface AllExtensions { | ||
TextStyle: typeof TextStyle; | ||
interface Commands { | ||
textStyle: { | ||
/** | ||
* Remove spans without inline style attributes. | ||
*/ | ||
removeEmptyTextStyle: () => Command; | ||
}; | ||
} | ||
} | ||
export declare const TextStyle: Mark<TextStyleOptions>; |
@@ -31,5 +31,2 @@ 'use strict'; | ||
return { | ||
/** | ||
* Remove spans without inline style attributes. | ||
*/ | ||
removeEmptyTextStyle: () => ({ state, commands }) => { | ||
@@ -36,0 +33,0 @@ const attributes = core.getMarkAttributes(state, this.type); |
@@ -27,5 +27,2 @@ import { Mark, mergeAttributes, getMarkAttributes } from '@tiptap/core'; | ||
return { | ||
/** | ||
* Remove spans without inline style attributes. | ||
*/ | ||
removeEmptyTextStyle: () => ({ state, commands }) => { | ||
@@ -32,0 +29,0 @@ const attributes = getMarkAttributes(state, this.type); |
@@ -31,5 +31,2 @@ (function (global, factory) { | ||
return { | ||
/** | ||
* Remove spans without inline style attributes. | ||
*/ | ||
removeEmptyTextStyle: () => ({ state, commands }) => { | ||
@@ -36,0 +33,0 @@ const attributes = core.getMarkAttributes(state, this.type); |
{ | ||
"name": "@tiptap/extension-text-style", | ||
"description": "text style extension for tiptap", | ||
"version": "2.0.0-alpha.10", | ||
"version": "2.0.0-alpha.11", | ||
"homepage": "https://tiptap.dev", | ||
@@ -27,3 +27,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "6bdeb4615c7b6afba4a2fcac4e3c35d7a7c0030a" | ||
"gitHead": "71d8fbbcb1eacd664bb6992e0086a589e4684e69" | ||
} |
@@ -14,6 +14,17 @@ import { | ||
export const TextStyle = Mark.create({ | ||
declare module '@tiptap/core' { | ||
interface Commands { | ||
textStyle: { | ||
/** | ||
* Remove spans without inline style attributes. | ||
*/ | ||
removeEmptyTextStyle: () => Command, | ||
} | ||
} | ||
} | ||
export const TextStyle = Mark.create<TextStyleOptions>({ | ||
name: 'textStyle', | ||
defaultOptions: <TextStyleOptions>{ | ||
defaultOptions: { | ||
HTMLAttributes: {}, | ||
@@ -45,6 +56,3 @@ }, | ||
return { | ||
/** | ||
* Remove spans without inline style attributes. | ||
*/ | ||
removeEmptyTextStyle: (): Command => ({ state, commands }) => { | ||
removeEmptyTextStyle: () => ({ state, commands }) => { | ||
const attributes = getMarkAttributes(state, this.type) | ||
@@ -63,7 +71,1 @@ const hasStyles = Object.entries(attributes).every(([, value]) => !!value) | ||
}) | ||
declare module '@tiptap/core' { | ||
interface AllExtensions { | ||
TextStyle: typeof TextStyle, | ||
} | ||
} |
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
22784
209