Open MiguelVis opened 12 months ago
Currently the button + of the field / plugin pagemedia only works with an editor if it's named content (as in the default template).
+
pagemedia
content
default
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:
themes/grav/app/pages/page/media.js
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.
Currently the button
+
of the field / pluginpagemedia
only works with an editor if it's namedcontent
(as in thedefault
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
, line155
: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.