twill
twill copied to clipboard
Clean Button missing in the Tiptap editor
Description
Contrary to what is mentioned in the doc, 'clean' button is not present on Tiptap toolbar.
https://github.com/area17/twill/blob/3.x/frontend/js/components/WysiwygTiptap.vue
Steps to reproduce
Add 'clean' to the 'toolbar-options' attribute.
Expected result
Clean button present in the toolbar
Actual result
No clean button
Versions
Twill version: 3.1
What would the "clean" button achieve? I think it's just a mistake in the doc, because nor the Quill or the TipTap editor have a clean button available
Quill does and it removes formatting on the selected text.
I see, then to achieve the same in tiptap we need a button that runs
editor
.chain()
.focus()
.clearNodes()
.unsetAllMarks()
.run()