mirror of
https://github.com/outline/outline.git
synced 2026-11-30 17:10:36 +03:00
fix: Empty placeholder shows up when no text but image in paragraph (#9593)
This commit is contained in:
1 parent
ecf53866b5
commit
cabae7a91e
2 files changed
+3
-1
No files matched your search
@@ -80,6 +80,7 @@ export default class BlockMenuExtension extends Suggestion {
|
||||
$start.depth === 1 &&
|
||||
state.selection.$from.pos === $start.pos + node.content.size &&
|
||||
!!textContent &&
|
||||
node.childCount === 0 &&
|
||||
node.textContent === "",
|
||||
text: this.options.dictionary.newLineEmpty,
|
||||
},
|
||||
|
||||
@@ -18,11 +18,12 @@ export default class Doc extends Node {
|
||||
return [
|
||||
new PlaceholderPlugin([
|
||||
{
|
||||
condition: ({ $start, parent, state, textContent }) =>
|
||||
condition: ({ $start, parent, node, state, textContent }) =>
|
||||
textContent === "" &&
|
||||
!isNull(parent) &&
|
||||
parent.type === state.doc.type &&
|
||||
parent.childCount === 1 &&
|
||||
node.childCount === 0 &&
|
||||
$start.index($start.depth - 1) === 0,
|
||||
text: this.options.placeholder,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user