Skip to content

Commit

Permalink
Fix Quill editor to use div instead of p for blocks.
Browse files Browse the repository at this point in the history
This fixes extra blank lines in the HTML output and relates to what
appears to be a bug/feature of all WYSIWYG editors I have evaluated,
including draft.js & slate.
  • Loading branch information
Fizzadar committed Jun 30, 2020
1 parent e9848ce commit 47d1fec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions kanmail/client/components/send/SendApp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ import { closeWindow } from 'window.js';
import { cleanHtml } from 'util/html.js'
import { get, post } from 'util/requests.js'

import Quill from 'quill';

// Use divs > p, see: https://github.com/quilljs/quill/issues/861#issuecomment-239961806
var Block = Quill.import('blots/block');
Block.tagName = 'DIV';
Quill.register(Block, true);


function makeContactLabel(contactTuple) {
if (!contactTuple[0]) {
Expand Down

0 comments on commit 47d1fec

Please sign in to comment.