How to display the placehoder only when editor is empty? (like in previous versions of Editor.js)
this.editor = new EditorJS({
holder: this.contentTarget,
data: this.contentValue,
placeholder: "Let's write an awesome newsletter...",
// ...
The above code used to display the placeholder only when the editor was empty.
Now, upgrading Editor.js to the latest version, it displays the placeholder for each empty paragraph...
How can I show that placeholder only when editor is empty? (like in previous versions of Editor.js)
The new recommendation is to specify a placeholder like "Enter text or paste a link"
@neSpecc Thanks for the quick reply! So is it no longer possible to have the old behavior? We had a placeholder like "Let's write an awesome newsletter....", but it is annoying to see it for every new paragraph, it made more sense to display it only when editor is completely empty.
You can try replacing the default Paragraph block with your own with such behavior.
You can read more about the new placeholder behavior here: https://codex.so/editorjs-2-30