quill icon indicating copy to clipboard operation
quill copied to clipboard

Table in 2.0.2

Open npcole opened this issue 1 year ago • 10 comments

I understand that Quill 2.0 includes a table module -- but is there a UI to go with that?

I've tried activating the module with table = True -- but I can't find any documentation on the module or how to get the toolbar to show the controls for it. Has anyone had more luck?

npcole avatar Jul 12 '24 15:07 npcole

+1

patrick-hertling avatar Jul 18 '24 16:07 patrick-hertling

I'm also curious about this. This is one of the features I've most been anticipating as we have many use cases for it. As of now, there is absolutely no documentation on it :(

ThanosAlmighty avatar Jul 19 '24 18:07 ThanosAlmighty

+1 for this also.

Would be great to at least have a documented API that we can use in case we want to build the UI ourselves.

stsrki avatar Jul 26 '24 08:07 stsrki

PS. for anyone who needs it. This is how you access the API

const toolbar = quill.getModule('toolbar');

if (toolbar) {
    toolbar.addHandler('table', () => {
        var table = quill.getModule('table');

        if (table) {
            table.insertTable(3, 3);
        }
    });
}

stsrki avatar Jul 26 '24 09:07 stsrki

getModule('table') is an old module, new one is tableEmbed

volser avatar Jul 29 '24 09:07 volser

getModule('table') is an old module, new one is tableEmbed

Can you explain how I register tableEmbed? Because whatever I try when I do the var table = quill.getModule('table-embed'); it returns undefined.

stsrki avatar Jul 29 '24 11:07 stsrki

getModule('table') is an old module, new one is tableEmbed

Can you explain how I register tableEmbed? Because whatever I try when I do the var table = quill.getModule('tableEmbed'); it returns undefined.

stsrki avatar Jul 29 '24 11:07 stsrki

import Quill from 'quill';

const quill = new Quill(#${props.name}, { theme: 'snow', modules: { table: true, toolbar: { container: toolbar, handlers: handlers, }, } });

but always get error "quill Cannot import modules/table. Are you sure it was registered?"

did i missed importing something?

Trexology avatar Aug 01 '24 07:08 Trexology

Maybe you can try quill table better

attoae avatar Aug 14 '24 09:08 attoae

me too but a little different "quill Cannot import theme/bubble. Are you sure it was registered?" : (

SarahSHortiz avatar Sep 24 '24 19:09 SarahSHortiz