My web application is based on Angular and I try to integrate Quill into it using ngx-quill library. I have created my custom embed blot containing just unmodifiable text block (retrieved from the database) and now I try to create a custom toolbar allowing users to insert instances of this blot into the text.
My question is, how is it possible to create a custom drop-down in Quill toolbar where I can supply my own content that will be shown to the user and inserted to the text?
I try to do it this way:
<quill-editor>
<div quill-editor-toolbar>
<select class="ql-attribute">
<option *ngFor="let attribute of documentAttributes()"
[title]="document.data[attribute.id]"
(click)="onAddAttribute(attribute.id)">
{{attribute.name}}
</option>
</select>
</div>
</quill-editor>
...but there are no values shown in the drop-down menu.
It seems that this problem has already been solved for React and plain JS. But it looks like it will be a little bit harder doing so in Angular, especially when Quill is integrated using QuillEditorComponent provided by ngx-quill library.