Comments (2)
Hi @doriandigital ,
I think this is a problem not unique to TipTap. Other editors have the same "feature" (not really a "bug"), where they enter an empty paragraph when the page is empty.
For now there is no way for me to change this, as this is the behavior of the underlying editor - I only wrote the Nova wrapper (so most of your thanks goes to @scrumpy ;-))
I would always have a bit more robust check when checking if a value coming from an editor is "empty", more like
if (!trim(strip_tags($field)))
Or even write a little custom helper method like html_field_is_empty
.
Thanks for commenting, but I will close this issue now.
from nova-tiptap.
Hi @doriandigital ,
I think this is a problem not unique to TipTap. Other editors have the same "feature" (not really a "bug"), where they enter an empty paragraph when the page is empty.For now there is no way for me to change this, as this is the behavior of the underlying editor - I only wrote the Nova wrapper (so most of your thanks goes to @scrumpy ;-))
I would always have a bit more robust check when checking if a value coming from an editor is "empty", more like
if (!trim(strip_tags($field)))
Or even write a little custom helper method like
html_field_is_empty
.Thanks for commenting, but I will close this issue now.
Makes total sense! Thank you for looking into it :)
from nova-tiptap.
Related Issues (20)
- Issue rendering paragraph toolbar button (missing icon) HOT 6
- editHtml is not working properly HOT 4
- Allow customisation of image inline setting HOT 9
- Update to Support Nova 4 HOT 12
- Link modal is wrongly placed on tiptap v2.8.0 on Nova 3 HOT 6
- Multiple Headimgs? HOT 3
- Is it required for installed a Laravel Nova ? HOT 1
- tiptap extensions HOT 1
- Text content shows through link modal HOT 4
- Support for dependsOn HOT 2
- Make images prunable HOT 2
- Content is saved to null without touching it HOT 2
- Link button not working in a modal
- Add support for new YouTube node?
- JS error on console HOT 1
- Attaching file HOT 1
- Can I change nbsp; to space? HOT 1
- Support for fontsize HOT 1
- Vue is not defined
- Dark theme HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nova-tiptap.