-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Using <br> instead of using <p> #3065
Comments
I'm only about to try this editor, hovever I stumbled across your question. |
Yeah, but what I need is a forced replace. I need a quilljs instance only meant to create html for email sending, and for this purpose I need NOT to use paragraphs but to use BR exclusively. I need that every time I hit ENTER it creates a BR and not a P. |
I see, well I can't help you with that. It will most likely require changing the source code. |
I see that quilljs used to use DIV for blocks, instead of P. Then they switched to use P. As mentioned here: @jhchen Is there a way to config quilljs instance to use DIVs instead of Ps as an optional feature? Thank you |
yes, you can configure block blot and register it: const Block = Quill.import('blots/block');
class DivBlock extends Block {}
DivBlock.tagName = 'DIV';
// true means we overwrite
Quill.register('blots/block', DivBlock, true); working example: https://jsfiddle.net/n4efwxd9/ |
@ttypic Thank you for this. Forced P tags in rich editors are for monsters. And unfortunately, unlike many other rich editors, Quill doesn't support shift+enter to insert a BR tag. |
i still got an issue with p tag |
Does anyone have a solution for this yet? It seems to be an important issue. |
Managed to use |
Is there any good&simple solution for the functionality SHIFT+ENTER --> In my opinion, this should be a standard functionality of a rich text editor! |
Quill 2.0 has been released (announcement post) with many changes and fixes. If this is still an issue please create a new issue after reviewing our updated Contributing guide 🙏 |
I created a new issue here: #4194 |
Hello,
Is there any way to configure quilljs to make use of BR instead of using P upon every time I hit ENTER key? In other words, not to use paragraphs, but BR instead.
Thanks for your help
The text was updated successfully, but these errors were encountered: