Archived topic
Code highlighting in GP Hooks?
2 replies · Started by Zesen on January 3, 2018
Yo Tom,
I use GP Hooks extensively for my projects and found that it is a bit difficult to spot simple errors in the code editor since it misses code highlighting feature, and hence I turned back to Sublime Text to edit code and then pasted them back in the hook boxes.
Is it possible to integrate code highlighter library into GP Hooks? We used to build a custom CMS and we used CodeMirror, which is licensed under MIT and super easy to use. I was thinking about adding CodeMirror into GP Hooks myself but I thought maybe I could try to file a feature request here first.
Any thoughts on this?
Thanks,
Zesen
While not handling the code highlighting, I have this code in my child theme functions.php to at least make it easier to read:
function my_custom_fonts() {
echo '<style> textarea[id^="generate_hooks"] { font-family: Courier New, monospace !important; } </style>';
}
add_action('admin_head', 'my_custom_fonts');
Simon
GP Hooks is currently being re-written and will include syntax highlighting :)