Quilljs on enter not creating new line

Viewed 1377

I am using Quilljs to create a simple rich text editor. But when I press enter, it does not create a new new line. I am using the following code to show and display the editor. It displays just fine and I can type, but I can't create a new line.

<div id="master-editor"></div>

let quill = new Quill('#master-editor', {
    theme: 'snow',
    modules: {
        toolbar: [
            [{header: [1, 2, false]}],
            ['bold', 'italic', 'underline'],
            ['image', 'formula', 'link'],
            [{'list': 'ordered'}, {'list': 'bullet'}]
        ]
    }
});

1 Answers

It turns out I had a mistake in the CSS. I made a style (display: inline-block) that applied to all paragraphs, which in this case included all the <p>'s in the editor.

Related