getgrav / getgrav/grav-plugin-admin

Attachable events on Dropzone init

Open
#1,085 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
PHP
Stars
377
Forks
225
Avg merge
11h 51m
Merged PRs (30d)
4

Description

I would like to suggest an easy adaptation to the Dropzone element on the` FilePicker` class. While working on a plugin to extend the functionality of Dropzone, it's come to my attention that I can only attach events to the Dropzone events. Such as `on added file` as per [documentation](http://www.dropzonejs.com/#event-list).

It would be nice to have an event that a plugin could attach to when Dropzone is initiated, as currently, even with the my plugin loading after admin.min.js, the Dropzone has still not init and as such, any modifications I do to it are then overwritten. Such a change should be easily implemented and could bring a whole new level of plugins.

A simpler approach albeit not as good would be to allow the previewTemplate variable (which creates the html for the dropzone) to be extended/overwritten.

I can provide more information upon request, either here or via the Slack.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.