Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean Button missing in the Tiptap editor #2534

Open
ConstantMath opened this issue Mar 12, 2024 · 3 comments
Open

Clean Button missing in the Tiptap editor #2534

ConstantMath opened this issue Mar 12, 2024 · 3 comments

Comments

@ConstantMath
Copy link

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
Screenshot 2024-03-12 at 12 39 11

Versions

Twill version: 3.1

@Tofandel
Copy link
Contributor

Tofandel commented Jun 5, 2024

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

@ifox
Copy link
Member

ifox commented Jun 5, 2024

Quill does and it removes formatting on the selected text.

@Tofandel
Copy link
Contributor

Tofandel commented Jun 5, 2024

I see, then to achieve the same in tiptap we need a button that runs

editor
  .chain()
  .focus()
  .clearNodes()
  .unsetAllMarks()
  .run()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants