Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tiptap/extension-text-align

Package Overview
Dependencies
Maintainers
5
Versions
176
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-text-align - npm Package Compare versions

Comparing version 2.10.4 to 2.11.0

6

dist/index.js

@@ -13,3 +13,3 @@ import { Extension } from '@tiptap/core';

alignments: ['left', 'center', 'right', 'justify'],
defaultAlignment: 'left',
defaultAlignment: null,
};

@@ -25,7 +25,7 @@ },

parseHTML: element => {
const alignment = element.style.textAlign || this.options.defaultAlignment;
const alignment = element.style.textAlign;
return this.options.alignments.includes(alignment) ? alignment : this.options.defaultAlignment;
},
renderHTML: attributes => {
if (attributes.textAlign === this.options.defaultAlignment) {
if (!attributes.textAlign) {
return {};

@@ -32,0 +32,0 @@ }

@@ -17,3 +17,3 @@ (function (global, factory) {

alignments: ['left', 'center', 'right', 'justify'],
defaultAlignment: 'left',
defaultAlignment: null,
};

@@ -29,7 +29,7 @@ },

parseHTML: element => {
const alignment = element.style.textAlign || this.options.defaultAlignment;
const alignment = element.style.textAlign;
return this.options.alignments.includes(alignment) ? alignment : this.options.defaultAlignment;
},
renderHTML: attributes => {
if (attributes.textAlign === this.options.defaultAlignment) {
if (!attributes.textAlign) {
return {};

@@ -36,0 +36,0 @@ }

@@ -20,3 +20,3 @@ import { Extension } from '@tiptap/core';

*/
defaultAlignment: string;
defaultAlignment: string | null;
}

@@ -23,0 +23,0 @@ declare module '@tiptap/core' {

{
"name": "@tiptap/extension-text-align",
"description": "text align extension for tiptap",
"version": "2.10.4",
"version": "2.11.0",
"homepage": "https://tiptap.dev",

@@ -32,3 +32,3 @@ "keywords": [

"devDependencies": {
"@tiptap/core": "^2.10.4"
"@tiptap/core": "^2.11.0"
},

@@ -35,0 +35,0 @@ "peerDependencies": {

@@ -23,3 +23,3 @@ import { Extension } from '@tiptap/core'

*/
defaultAlignment: string,
defaultAlignment: string | null,
}

@@ -56,3 +56,3 @@

alignments: ['left', 'center', 'right', 'justify'],
defaultAlignment: 'left',
defaultAlignment: null,
}

@@ -69,3 +69,3 @@ },

parseHTML: element => {
const alignment = element.style.textAlign || this.options.defaultAlignment
const alignment = element.style.textAlign

@@ -75,3 +75,3 @@ return this.options.alignments.includes(alignment) ? alignment : this.options.defaultAlignment

renderHTML: attributes => {
if (attributes.textAlign === this.options.defaultAlignment) {
if (!attributes.textAlign) {
return {}

@@ -78,0 +78,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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc