From 11b48669482db5122bcd60dc1b65f839e77e5a48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Mon, 14 Jun 2021 15:07:17 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20don=E2=80=99t=20show=20placeholder=20if?= =?UTF-8?q?=20node=20contains=20only=20atom=20nodes,=20fix=20#1457?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/extension-placeholder/src/placeholder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/extension-placeholder/src/placeholder.ts b/packages/extension-placeholder/src/placeholder.ts index 803ba4b6..1d9692f6 100644 --- a/packages/extension-placeholder/src/placeholder.ts +++ b/packages/extension-placeholder/src/placeholder.ts @@ -40,7 +40,7 @@ export const Placeholder = Extension.create({ doc.descendants((node, pos) => { 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) { const classes = [this.options.emptyNodeClass]