Editor button not resizing when default css of...

Search
Other Bug Reports questions
Forum

Editor button not resizing when default css of administrator template is edited

Jeroen's Avatar Jeroen
I love sourcerer and the editor button is very handy. But if I change the css of the default administrator template to make a buttons a little bit smaller, the editor button of sourcerer is not changing because width="24" and height="24" are defined in the script
The it looks like this:


In the sourcerer.php file on line 35 the code is:
protected $button_icon = '<svg viewBox="0 0 24 24" style="fill:none;" width="24" height="24" fill="none" stroke="currentColor">'
		. '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4" />'
		. '</svg>';

If you replace that with this line:
protected $button_icon = '<span class="fas fa-code"></span>';

The editor-button is also changing like all other buttons


The class="fas fa-code" works out of the box with Joomla, so maybe it's an idea to change this code in your script by default.
Peter van Westen's Avatar Peter van Westen ADMIN
The FontAwesome icon set is too limiting for the different editor buttons I have for my extensions.
Joomla offers a way to set svg icons instead of using classes.

It is pretty much down to the editor and template to control the display of these.

I recommend you add CSS styling to override the width and height of the svgs to match what you need.
Please post a rating at the Joomla! Extensions Directory
Jeroen's Avatar Jeroen
Ok, clear. I'll try it that way
You can only post on this forum if you log in