getgrav / getgrav/grav-plugin-admin

Feature Request: Option to register filetype specific actions to admin-plugin from other plugins

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

Description

The page editor has actions for the files in the media area (bottom):

* insert (+)
* view (eye)
* delete (x)

For images the insert button creates: `![](test.jpg)`

For a pgn file it creates: `[test.pgn](test.pgn)`

Please extend the admin plugin. I would like to register my plugin (javascript part) within the admin plugin to extend the functionality. The `+`-button chould change to a pulldown menu button (optional) like in the editor toolbar if the number of actions is more than one action.

The actions are shown as simple text (list).

As a result each button at a file in the media area could have more than one action. If a user clicks on an action which is added from a plugin, the action from the plugin is triggerd, gets the filename and creates the snippet.

Please provide a simple example on how to use it from a custom plugin - maybe editor-buttons (action `link only` embeds the image without `!` and adds the paramter `?link&display=text`).

Here is a "screenshot" as example:

![grafik](https://cloud.githubusercontent.com/assets/1454849/25143045/47ed239a-2469-11e7-97a3-dbd791f9bb6c.png)

Since this is for my chess club, i would spend the money to become a baker for 2 $ a month - at least for 2 years.

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.