annoying insert of code by Helix Ultimate

Everything to do with Joomla! 3.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
Thomsterdam
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 122
Joined: Mon Dec 12, 2011 5:55 pm

annoying insert of code by Helix Ultimate

Post by Thomsterdam » Sat May 08, 2021 7:46 pm

Hi there,
I am using Helix Ultimate on one of my websites. I used to build my own, but I gave HU a try. One thing that bugs me, is that HU inserts code once I use a certain class or css and I can't find a way to strip this stuff.

Here is what I see in the article editor:

Code: Select all

<p><img class="caption" style="padding-left: 15px; float: right;width:100px !important;" title="picture name" src="images/picturename100.jpg" alt="picture alt" />
but when I view the code in the code inspector I see this:

Code: Select all

<p><div class="img_caption right" style="float: right; width: 85px;"><img class="caption" style="padding-left: 15px; float: right;width:100px !important;" title="picture name" src="/images/picturename100.jpg" alt="picture alt"><p class="img_caption">Name of person in the picture</p></div>
Is dit ook niet.... etc: rest of the paragraph</p>
Basically, HU is inserting the code "style="float right; width:85px;" which limits the containing div to a maximum width of 85px.
The result is that the image is made smaller while the other images are 100px in width. It has to do with the fact that I have inserted "float:right;", because the pictures on the left are not given this extra code with a width of 85px.

I can see that the 85px width is caused by the padding-left:15px that I inserted. It all started when I saw that there is no margin around the image, as you can see here:
2021-05-08_21-55.png
So I added a margin of 15px to the left of the picture, but it had no effect, not even after adding !important to the styling.


Is there anyone who knows how to get the margin to the left of the picture? What do I need to dismantle in UH?

Any help appreciated!

Thanx,


Thom
You do not have the required permissions to view the files attached to this post.
Give a man a fish and you feed him for a day;
teach a man to fish and you feed him for a lifetime.

User avatar
Pavel-ww
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 151
Joined: Tue Jun 30, 2020 12:17 pm

Re: annoying insert of code by Helix Ultimate

Post by Pavel-ww » Sun May 09, 2021 7:29 am

Hi. I do not think this is an issue of Helix Ultimate. Helix Ultimate does not use anything to add code and styles inline in the article editor. Any CSS code running from Helix Ultimate has the prefix sp- . It looks like an issue with the article editor. Use JCE and configure behavior in it when pressing ENTER and illumination of blocks, whatever error.

Thomsterdam
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 122
Joined: Mon Dec 12, 2011 5:55 pm

Re: annoying insert of code by Helix Ultimate

Post by Thomsterdam » Sun May 09, 2021 11:03 am

Hi Pavel,
Thanks for your answer. I considered that. So I changed from my default article editor which is JCE to TinyMCE and even to no editor at all, but that didn't change the problem. I will ask Ryan from JCE if he can give me a solution.

Thanx

Thom
Give a man a fish and you feed him for a day;
teach a man to fish and you feed him for a lifetime.

illovo
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Sun Jan 13, 2013 9:30 am
Contact:

Re: annoying insert of code by Helix Ultimate

Post by illovo » Sun May 09, 2021 12:15 pm

When you use class="caption" for an img and JHtml::_('behavior.caption'); is loaded (in Joomla 3 mostly the case) a Joomla JHtml-Helper and associated JS becomes active.

https://github.com/joomla/joomla-cms/bl ... r.php#L110

https://github.com/joomla/joomla-cms/bl ... pressed.js

The code tries to adapt the width for img and the caption below the image and puts a div around.
The JS is completely outdated and far away from responsive needs.

That's the reason why it has been replaced in J4 by pure HTML (figure and figcaption) e.g. for intro image layouts.

User avatar
Pavel-ww
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 151
Joined: Tue Jun 30, 2020 12:17 pm

Re: annoying insert of code by Helix Ultimate

Post by Pavel-ww » Sun May 09, 2021 12:47 pm

illovo wrote:
Sun May 09, 2021 12:15 pm
When you use class="caption" for an img and JHtml::_('behavior.caption'); is loaded (in Joomla 3 mostly the case) a Joomla JHtml-Helper and associated JS becomes active.
Hi. Thanks, good to know


Post Reply

Return to “Templates for Joomla! 3.x”