Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Custom Editor Button

Solved by Simon View solution

Started by Simon 5 years ago · 5 replies · 1080 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 jeremycherfas, 1 week ago
4 185 2 days ago
General · by lynbor, 6 days ago
2 128 3 days ago
General · by Old Man Umby, 1 week ago
1 103 1 week ago
General · by Sebastian, 2 weeks ago
1 127 2 weeks ago
General · by Andy Miller, 3 weeks ago
0 251 3 weeks ago