summernote: Placeholder doesn't work
When summernote gets initialized, the contents get initialized to <p><br></p>
. The div is therefore not empty and placeholder doesn’t get shown. Am I missing something here?
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 17 (4 by maintainers)
Commits related to this issue
- Implement custom placeholder. - Fixed #1326, #1202, #863 — committed to summernote/summernote by hackerwins 9 years ago
I came here because i have been trying all ways to make the placeholder show over the past 2 days.
If your placeholder is not showing, it is CRUCIAL to ensure your summer note div looks like this
NOT THIS
ALSO NOT THIS
Any space between the div will prevent placeholder from showing, and for Firefox, it cause your cursor to start off position too.
on summernote v0.8.1
I am using the current version of Chrome v8 of summernote and the placeholder option still does not work.
Yes, I see that; however I believe that’s a bit of a gotcha. Also, clicking into the editor and hitting backspace to remove the initial paragraph still does not display the placeholder. When I look in the DOM there is in fact a placeholder element of class=“note-placeholder”; however it never shows up.
This was my fix…
Overall I really like this editor!
Placeholder with {airmode: true} does not disappear when starting to write. It gets mixed up with the text. Thanks @eric-mesaros for your workaround.
Just tried 0.7.0, but it doesn’t work correctly.
Still places the placeholder as first editor text.It doesn’t remove the placeholder once you start typing