This commit is contained in:
Hans Pagel
2021-02-03 16:50:15 +01:00
parent 6e9815c911
commit 1ea3de2ec1

View File

@@ -37,6 +37,7 @@ export default Extension.create({
doc.descendants((node, pos) => {
const hasAnchor = anchor >= pos && anchor <= (pos + node.nodeSize)
// TODO: should be false for image nodes (without text content), is true though
const isNodeEmpty = node.content.size === 0
if ((hasAnchor || !this.options.showOnlyCurrent) && isNodeEmpty) {