fix: check for empty text, fix #1292
This commit is contained in:
@@ -40,7 +40,7 @@ export const Placeholder = Extension.create<PlaceholderOptions>({
|
||||
|
||||
doc.descendants((node, pos) => {
|
||||
const hasAnchor = anchor >= pos && anchor <= (pos + node.nodeSize)
|
||||
const isEmpty = !node.isLeaf && isNodeEmpty(node)
|
||||
const isEmpty = !node.isLeaf && !node.textContent
|
||||
|
||||
if ((hasAnchor || !this.options.showOnlyCurrent) && isEmpty) {
|
||||
const classes = [this.options.emptyNodeClass]
|
||||
|
||||
Reference in New Issue
Block a user