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 · 998 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 days ago
2 80 2 days ago
General · by Andy Miller, 6 days ago
0 144 6 days ago
General · by Veehem, 1 week ago
0 144 1 week ago
General · by milkboy, 1 week ago
0 138 1 week ago
General · by ian russell, 2 weeks ago
2 226 2 weeks ago