Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Custom Editor Button

Solved by Simon View solution

Started by Simon 5 years ago · 5 replies · 1138 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 Andy Miller, 6 days ago
0 108 6 days ago
General · by lynbor, 1 month ago
3 437 2 weeks ago
General · by lynbor, 3 weeks ago
7 557 2 weeks ago
General · by Harry, 2 weeks ago
0 159 2 weeks ago
General · by Old Man Umby, 1 month ago
2 308 3 weeks ago