Skip to content
Grav 2.0 is officially stable. Read the announcement →
General

Custom Editor Button

Solved by Simon View solution

Started by Simon 5 years ago · 5 replies · 1030 views
5 years ago

In the main editor is there a simple way to add a button?
I would like to to add a <pre></pre> button to make using the prism highlighting easier.

It seems such a simple thing but I cannot find a plugin or even guide to achieve this.

Thanks for any suggestions.

5 years ago Solution

I have a workround, I setup hotkeys to type the tags instead.

3 years ago

In case anyone stumbles across this thread and like me wants to add buttons:
I searched Grav's files and found the button configuration here:

/user/plugins/admin/themes/grav/js/admin.min.js
and
/user/plugins/admin/themes/grav/app/forms/fields/editor/buttons.js

last edited 08/04/23 by Shizuka Kanegawa

Suggested topics

Topic Participants Replies Views Activity
General · by jean-louis67, 3 weeks ago
2 308 3 weeks ago
General · by Andy Miller, 3 weeks ago
0 310 3 weeks ago
General · by Veehem, 4 weeks ago
0 263 4 weeks ago
General · by milkboy, 4 weeks ago
0 264 4 weeks ago
General · by ian russell, 1 month ago
2 335 1 month ago