Fieldtype

Archived
Forum
(read-only)

Expresso

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5

Back to this add-on's main page
View Other Add-ons From PutYourLightsOn

     

Extension hook?

Feature (Resolved)

Tyssen
Tyssen

I’m wondering if it’d be possible for future versions of Expresso to have an extension hook like Wygwam does so that we could do things like this: http://dmlogic.com/blog/managing-wygwams-settings-via-code/

PutYourLightsOn
# 1
Developer
PutYourLightsOn

if you open up expresso/settings.php then you’ll see a variable called $this->all_toolbar_icons which you can tweak, that way you just need to copy this file from one site to the next. you may have to create icons for the new toolbar elements.

what do you think of that as a solution? i understand that you have more control with an extension but i’m trying to keep Expresso as lightweight as possible.

Tyssen
# 2
Tyssen

I’ve just downloaded 1.7.1a to give this a go and have added ‘‘FontSize’ to $this->all_toolbar_icons but it doesn’t show up in either Expresso’s global settings page or in a publish/edit form. Is there something else I’m missing?

PutYourLightsOn
# 3
Developer
PutYourLightsOn

hmm, just tested and it shows up in global settings but without an icon as this would have to be added manually. i may end up adding an extension hook but am not too keen on it. for now you can change line 238, for example:

$js .= 'toolbar: [["Bold","Italic","Underline","Strike","FontSize"]'
Tyssen
# 4
Tyssen

Actually it helps if you’re editing the correct settings file. :/ So yeah, I can now see a checkbox for FontSize on the settings page but when I select it, it doesn’t appear in the editor. Editing ft.expresso.php is what I’d done before to add FontSize but I’m wondering if it should be possible with the method you mentioned first?

PutYourLightsOn
# 5
Developer
PutYourLightsOn

actually no since the toolbar options are set somewhere else as well. i do plan on adding a completely customisable toolbar in the near future though…

Tyssen
# 6
Tyssen

OK cool, sounds good.

PutYourLightsOn
# 7
Developer
PutYourLightsOn

custom toolbar available as of version 1.8