grav-plugin-admin icon indicating copy to clipboard operation
grav-plugin-admin copied to clipboard

Feature: configure the editor related to pagemedia field.

Open MiguelVis opened this issue 2 years ago • 0 comments

Currently the button + of the field / plugin pagemedia only works with an editor if it's named content (as in the default template).

The purpose of this button is to insert an image or file into the editor as a markdown link.

On the other hand, the drag & drop option works always.

This is because the editor name is hardcoded in the plugin code at themes/grav/app/pages/page/media.js, line 155:

let editor = Editor.editors.filter((index, editor) => $(editor).attr('name') === 'data[content]');

So as I understand there is no option to instruct the field / plugin to select another editor.

It could be very difficult to implement?

I will appreciate any help on this.

Thanks.

MiguelVis avatar Jul 12 '23 12:07 MiguelVis