Closed rick2ricks closed 6 months ago
This should work. There is an example in the Demo repo if I remember it correctly.
But you need to pass true as second Parameter to override an existing blot.
Am 16. Mai 2024 23:19:42 MESZ schrieb rick2ricks @.***>:
Hi,
I am not sure if I am missing somthing, but the following shouldn't work?
//This returns unkown: const Block = Quill.import('blots/block'); class DivBlot extends Block { static blotName = 'div'; static tagName = 'div'; } Quill.register(DivBlot);
How else should I extend and register a BlockBlot after upgrading to @. and @.
Thank you.
-- Reply to this email directly or view it on GitHub: https://github.com/KillerCodeMonkey/ngx-quill/issues/1854 You are receiving this because you are subscribed to this thread.
Message ID: @.***>
Thanks for the response, but the problem starts before the register, when trying to extend Block, because Quill.import('blots/block') returns unkown.
Also I could not find any references to extending a Blot or using Quill.register in any examples.
just checked the quilljs repo and tried this:
import Block from 'quill/blots/block';
Block.tagName = "DIV";
Quill.register(Block, true);
it is working
Edit: committed it to the demo repo and deployed the new version
Don't know why I didn't find this import before.
import Block from 'quill/blots/block';"
Thank you.
Hi,
I am not sure if I am missing somthing, but the following shouldn't work?
How else should I extend and register a BlockBlot after upgrading to quill@2 and ngx-quill@25.
Thank you.