[Bug]: Better HTML output for task item? #4774
Labels
Category: Open Source
The issue or pull reuqest is related to the open source packages of Tiptap.
Type: Bug
The issue or pullrequest is related to a bug
Which packages did you experience the bug in?
extension-task-item
What Tiptap version are you using?
2.1.15
What’s the bug you are facing?
It's not strictly a bug but possibly an improvement suggestion for the HTML output of the task item?
The output for the task item doesn't match the parse input and results in quite a bit of extra markup in saved HTML. The input for a task item is:
But then the HTML output (for saving) is:
What browser are you using?
Chrome
Code example
No response
What did you expect to happen?
I would expect the extra markup to be removed in the output HTML, and the output to match the input. Since it's a node view as described in the docs the output can be simple.
Anything to add? (optional)
I created a custom
renderHTML
which makes the output match the input and seems to work well.Just stores in HTML the info needed to restore the content, rather than the extra divs, label and input elements etc.
Now the output is cleaner and works the same (since the node view adds the markup in the editor):
Let me know what you think!
Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: