Datatable Editor Quill - can't combine header and list style

Datatable Editor Quill - can't combine header and list style

CapamaniaCapamania Posts: 233Questions: 81Answers: 5

I'm using datatable editor and its quill plugin https://editor.datatables.net/plug-ins/field-type/editor.quill .

For some reason I cannot combine a header style with a bullet list. I can select a different header 2, 3 or 4 ... but if I select a list, it jumps back to the default "" header and vice versa.

How can I fix this? In the example it works: https://quilljs.com/docs/formats/

That's my editor init:

// Editor Newsroom
editor_newsroom = new $.fn.dataTable.Editor( {
    // ...
    fields: [{
        label: "Bodytext:",
        name: "news.bodytext",
        className: 'block full',
        type: "quill",
        toolbarHtml:
            '<div id="toolbar-toolbar" class="toolbar">'+
                '<span class="ql-formats">'+
                    '<select class="ql-header">'+
                        '<option value="2"></option>'+
                        '<option value="3"></option>'+
                        '<option value="4"></option>'+
                        '<option selected=""></option>'+
                    '</select>'+
                '</span>'+
                '<span class="ql-formats">'+
                    '<button class="ql-list" value="ordered"></button>'+
                    '<button class="ql-list" value="bullet"></button>'+
                '</span>'+
            '</div>'
        }
    ]
});

Answers

  • allanallan Posts: 63,678Questions: 1Answers: 10,497 Site admin

    Are you able to give me a link to an example showing the issue please? The description makes it sound like a Quill issue, but I'd like to take a look at the page to understand what is happening, and as you say, it is working in their example (are you loading the latest version of Quill?).

    Allan

Sign In or Register to comment.