@tiptap/extension-placeholder
Advanced tools
Comparing version 2.0.0-beta.21 to 2.0.0-beta.22
@@ -6,2 +6,13 @@ # Change Log | ||
# [2.0.0-beta.22](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-placeholder@2.0.0-beta.21...@tiptap/extension-placeholder@2.0.0-beta.22) (2021-06-14) | ||
### Bug Fixes | ||
* don’t show placeholder if node contains only atom nodes, fix [#1457](https://github.com/ueberdosis/tiptap/issues/1457) ([11b4866](https://github.com/ueberdosis/tiptap/commit/11b48669482db5122bcd60dc1b65f839e77e5a48)) | ||
# [2.0.0-beta.21](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-placeholder@2.0.0-beta.20...@tiptap/extension-placeholder@2.0.0-beta.21) (2021-05-28) | ||
@@ -8,0 +19,0 @@ |
@@ -31,3 +31,3 @@ 'use strict'; | ||
const hasAnchor = anchor >= pos && anchor <= (pos + node.nodeSize); | ||
const isEmpty = !node.isLeaf && !node.textContent; | ||
const isEmpty = !node.isLeaf && !node.childCount; | ||
if ((hasAnchor || !this.options.showOnlyCurrent) && isEmpty) { | ||
@@ -34,0 +34,0 @@ const classes = [this.options.emptyNodeClass]; |
@@ -27,3 +27,3 @@ import { Extension } from '@tiptap/core'; | ||
const hasAnchor = anchor >= pos && anchor <= (pos + node.nodeSize); | ||
const isEmpty = !node.isLeaf && !node.textContent; | ||
const isEmpty = !node.isLeaf && !node.childCount; | ||
if ((hasAnchor || !this.options.showOnlyCurrent) && isEmpty) { | ||
@@ -30,0 +30,0 @@ const classes = [this.options.emptyNodeClass]; |
@@ -29,3 +29,3 @@ (function (global, factory) { | ||
const hasAnchor = anchor >= pos && anchor <= (pos + node.nodeSize); | ||
const isEmpty = !node.isLeaf && !node.textContent; | ||
const isEmpty = !node.isLeaf && !node.childCount; | ||
if ((hasAnchor || !this.options.showOnlyCurrent) && isEmpty) { | ||
@@ -32,0 +32,0 @@ const classes = [this.options.emptyNodeClass]; |
{ | ||
"name": "@tiptap/extension-placeholder", | ||
"description": "placeholder extension for tiptap", | ||
"version": "2.0.0-beta.21", | ||
"version": "2.0.0-beta.22", | ||
"homepage": "https://tiptap.dev", | ||
@@ -31,3 +31,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "13d9ffda82e9628670a8c9e677b84432b2b924f5" | ||
"gitHead": "6aa424b422ba3b7fd8dcc88f980702d8922cf67f" | ||
} |
@@ -43,3 +43,3 @@ import { Editor, Extension } from '@tiptap/core' | ||
const hasAnchor = anchor >= pos && anchor <= (pos + node.nodeSize) | ||
const isEmpty = !node.isLeaf && !node.textContent | ||
const isEmpty = !node.isLeaf && !node.childCount | ||
@@ -46,0 +46,0 @@ if ((hasAnchor || !this.options.showOnlyCurrent) && isEmpty) { |
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
32069