Skip to content

Pass Quill instance to onDrop #2

@earshinov

Description

@earshinov

Hello, and thanks for a useful package.

One thing that we are missing is an ability to access Quill instance from the onDrop handler.

Our custom implementation of onDrop will call quill.insertEmbed instead of manually inserting a DOM node. One of the reasons for that is to insert the dropped image at the position of cursor, not to the end of edited document. In order to do that we need to access the Quill instance.

I guess, the best option is to pass the Quill instance as this context to the onDrop handler. This way it will even be backwards compatible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions