Quill: How to disable default wrap into p tags?

Created on 8 Oct 2017  路  4Comments  路  Source: quilljs/quill

Hello I would like to know, how I can disable the default wrapping into p tags.
I am using the editor to edit translations e.g. for labels and the p tags are screwing with the layout.
Is there an easy way to do it?

All 4 comments

Quill need to wrap lines with a tag.
You can try setting matchVisual:false

You can try to remove spacing with CSS:
https://github.com/quilljs/quill/issues/1631#issuecomment-320782792

You can also try to replace the default p tag with a div tag:
https://github.com/quilljs/quill/issues/861#issuecomment-239961806

replacing p tags with divs is unforunately only a workaround that works so far.
Are you saying there is no way to just load content let's say "my one line content" and without changes save it without creating a "my one line content" ?

As I said, Quill need to wrap each line with a tag. You can configure this tag and change the spacing with CSS.
You can remove the p tag on your server after the user finish editing.

Thanks for the information.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kivylius picture Kivylius  路  3Comments

GildedHonour picture GildedHonour  路  3Comments

lastmjs picture lastmjs  路  3Comments

markstewie picture markstewie  路  3Comments

benbro picture benbro  路  3Comments