@tiptap/extension-text-align
Advanced tools
Comparing version 2.0.0-beta.19 to 2.0.0-beta.20
@@ -6,2 +6,13 @@ # Change Log | ||
# [2.0.0-beta.20](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-text-align@2.0.0-beta.19...@tiptap/extension-text-align@2.0.0-beta.20) (2021-06-18) | ||
### Bug Fixes | ||
* remove default types for textAlign extension, fix [#1430](https://github.com/ueberdosis/tiptap/issues/1430) ([b4e41af](https://github.com/ueberdosis/tiptap/commit/b4e41afd1798e7eba4ccb0804be1ed2473c1f4d2)) | ||
# [2.0.0-beta.19](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-text-align@2.0.0-beta.18...@tiptap/extension-text-align@2.0.0-beta.19) (2021-06-17) | ||
@@ -8,0 +19,0 @@ |
@@ -10,3 +10,3 @@ 'use strict'; | ||
defaultOptions: { | ||
types: ['heading', 'paragraph'], | ||
types: [], | ||
alignments: ['left', 'center', 'right', 'justify'], | ||
@@ -42,6 +42,6 @@ defaultAlignment: 'left', | ||
} | ||
return this.options.types.some(type => commands.updateAttributes(type, { textAlign: alignment })); | ||
return this.options.types.every(type => commands.updateAttributes(type, { textAlign: alignment })); | ||
}, | ||
unsetTextAlign: () => ({ commands }) => { | ||
return this.options.types.some(type => commands.resetAttributes(type, 'textAlign')); | ||
return this.options.types.every(type => commands.resetAttributes(type, 'textAlign')); | ||
}, | ||
@@ -48,0 +48,0 @@ }; |
@@ -6,3 +6,3 @@ import { Extension } from '@tiptap/core'; | ||
defaultOptions: { | ||
types: ['heading', 'paragraph'], | ||
types: [], | ||
alignments: ['left', 'center', 'right', 'justify'], | ||
@@ -38,6 +38,6 @@ defaultAlignment: 'left', | ||
} | ||
return this.options.types.some(type => commands.updateAttributes(type, { textAlign: alignment })); | ||
return this.options.types.every(type => commands.updateAttributes(type, { textAlign: alignment })); | ||
}, | ||
unsetTextAlign: () => ({ commands }) => { | ||
return this.options.types.some(type => commands.resetAttributes(type, 'textAlign')); | ||
return this.options.types.every(type => commands.resetAttributes(type, 'textAlign')); | ||
}, | ||
@@ -44,0 +44,0 @@ }; |
@@ -10,3 +10,3 @@ (function (global, factory) { | ||
defaultOptions: { | ||
types: ['heading', 'paragraph'], | ||
types: [], | ||
alignments: ['left', 'center', 'right', 'justify'], | ||
@@ -42,6 +42,6 @@ defaultAlignment: 'left', | ||
} | ||
return this.options.types.some(type => commands.updateAttributes(type, { textAlign: alignment })); | ||
return this.options.types.every(type => commands.updateAttributes(type, { textAlign: alignment })); | ||
}, | ||
unsetTextAlign: () => ({ commands }) => { | ||
return this.options.types.some(type => commands.resetAttributes(type, 'textAlign')); | ||
return this.options.types.every(type => commands.resetAttributes(type, 'textAlign')); | ||
}, | ||
@@ -48,0 +48,0 @@ }; |
{ | ||
"name": "@tiptap/extension-text-align", | ||
"description": "text align extension for tiptap", | ||
"version": "2.0.0-beta.19", | ||
"version": "2.0.0-beta.20", | ||
"homepage": "https://tiptap.dev", | ||
@@ -26,3 +26,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "3757d07f706d00241c5989d4fc8de03edc793ede" | ||
"gitHead": "c3cebfe7529e3a82a5529f8295e4e50c30beaf70" | ||
} |
@@ -28,3 +28,3 @@ import { Extension } from '@tiptap/core' | ||
defaultOptions: { | ||
types: ['heading', 'paragraph'], | ||
types: [], | ||
alignments: ['left', 'center', 'right', 'justify'], | ||
@@ -64,6 +64,6 @@ defaultAlignment: 'left', | ||
return this.options.types.some(type => commands.updateAttributes(type, { textAlign: alignment })) | ||
return this.options.types.every(type => commands.updateAttributes(type, { textAlign: alignment })) | ||
}, | ||
unsetTextAlign: () => ({ commands }) => { | ||
return this.options.types.some(type => commands.resetAttributes(type, 'textAlign')) | ||
return this.options.types.every(type => commands.resetAttributes(type, 'textAlign')) | ||
}, | ||
@@ -70,0 +70,0 @@ } |
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
33148