-
-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot register a BlockBlot #1854
Comments
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:
#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.
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.
The text was updated successfully, but these errors were encountered: