Open sylvainpe opened 1 week ago
Why change the tagName
of Block
?
Block
is the super class of Quill
.
Maybe you want to change the tagName
of TableCellBlock
, as follow:
const TableCellBlock = Quill.import('formats/table-cell-block');
TableCellBlock.tagName = 'div';
I'm not sure if changing it like this will cause other problems. I'm wondering what is your starting point for doing this?
I managed to keep using P as default. it's just that when i render my quill html I don't really like having paragraphs, because sometimes I just want to display things "in line".
(edit: I saw this: https://stackoverflow.com/questions/45496023/quill-make-editor-wrap-text-in-div-instead-of-p-tag)
I think you can close the issue if you like.
Okay, I need some time to verify this issue and get back to you later.
You can use the following method in the current version.
const Block = Quill.import('blots/block');
Block.tagName = 'div';
Quill.register({ 'blots/block': Block }, true);
Quill.register({
'modules/table-better': QuillTableBetter
}, true);
const TableCellBlock = Quill.import('formats/table-cell-block');
TableCellBlock.tagName = 'div';
I am considering whether to remove TableCellBlock.tagName
and inherit Block.tagName
in future versions.
Replacing default p tags by div make quill-table-better crash on load
How I load default data in editor: