hygraph / rich-text

A set of companion packages for Hygraph's Rich Text Field
MIT License
93 stars 18 forks source link

<p></p> returned in empty rich text box #124

Open cybermedi opened 6 months ago

cybermedi commented 6 months ago

When anyone accidentally click into rich text field it automatically create and empty paragraph. The API is then inconsistent. In proper empty field the return is NULL and "clicked" field it return "

" This makes front end testing complicated when do not render if the field is empty.

Solution: on hygraph side check if the field is "optically" empty before the safe and remove empty paragraph tags.