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

Option to remove default HTML wrapper #208

Closed
p1xel007 opened this issue Sep 27, 2023 · 2 comments
Closed

Option to remove default HTML wrapper #208

p1xel007 opened this issue Sep 27, 2023 · 2 comments
Labels
bug Something isn't working released

Comments

@p1xel007
Copy link

p1xel007 commented Sep 27, 2023

Currently by default the content is wrapped with <p></p> tags

Is it possible to remove this default <p></p> tags from the content and have just the raw content without any html tags wrapped around them, and only add tags by selecting from the menu?

@yikoyu
Copy link
Owner

yikoyu commented Sep 27, 2023

ueberdosis/tiptap#154

I think it can be like this.

https://github.com/yikoyu/vuetify-pro-tiptap/blob/808d9ce684e9f05650f521ead1df3491118723a3/src/components/VuetifyTiptap.vue#L149..L154

function getOutput(editor: CoreEditor, output: Props['output']) {
  if (output === 'html') return editor.isEmpty ? '' : editor.getHTML()
  if (output === 'json') return editor.isEmpty ? {} : editor.getJSON()
  if (output === 'text') return editor.isEmpty ? '' : editor.getText()
  return ''
}

If everything goes smoothly, it will be fixed in v2.3.1.

@yikoyu yikoyu added the bug Something isn't working label Sep 27, 2023
@yikoyu yikoyu closed this as completed in fa3c2db Jan 18, 2024
yikoyu pushed a commit that referenced this issue Jan 20, 2024
## [2.4.0](v2.3.0...v2.4.0) (2024-01-20)

### Features

* dialog can be customized with dialogComponent for custom components and styles ([5407d53](5407d53)), closes [#253](#253)
* **locale:** add Dutch locale ([#243](#243)) ([33ff84e](33ff84e))
* **VuetifyTiptap:** add 'hideBubble' prop to hide the bubble menu ([60318c9](60318c9))
* **VuetifyTiptap:** add removeDefaultWrapper option to remove default wrapper ([fa3c2db](fa3c2db)), closes [#208](#208)

### Bug Fixes

* bubble menu type is missing ([339251a](339251a))
* **BubbleMenu:** repeatedly selecting table cells crashes ([dafd80d](dafd80d))
* **extensions:** disable commands that cannot be used in certain operations ([7432b7e](7432b7e))
* **extensions:** props type error ([2381b31](2381b31))
* sharing global parameters among multiple editors ([259e6e6](259e6e6)), closes [#253](#253)
* **Table:** unable to create table for mobile devices ([d33c67a](d33c67a)), closes [#255](#255)
@yikoyu
Copy link
Owner

yikoyu commented Jan 20, 2024

🎉 This issue has been resolved in version 2.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

2 participants