[v4] RichEditor (tiptap) always leave a `<p></p>` behind!
not sure dose this consider a bug? since I dont remember the same behavior on adams tiptap plugin.
test code:
and storing it as html..
when remove all content from the editor still there a
P
tag.
if this normal, how we should check if the field has actual content or not.
previously we do: if(filled($zeusForm->details))
but its always filled even if the user didnt write anything!Solution:Jump to solution
I swear I’m handling this some where in my plugin to convert between null and the tag, but can’t find it. 😂
But, yes, it’s expected behavior with Tiptap since it has to have p tag at minimum with prosemirror, otherwise you wouldn’t be able to insert a cursor to start typing....
3 Replies
for now:
filled(strip_tags($zeusForm->details))
Solution
I swear I’m handling this some where in my plugin to convert between null and the tag, but can’t find it. 😂
But, yes, it’s expected behavior with Tiptap since it has to have p tag at minimum with prosemirror, otherwise you wouldn’t be able to insert a cursor to start typing.
got it now, make sense 👍
i think
i think
filled(strip_tags($zeusForm->details))
is good enough