You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#107799 Placing an image in a text

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Django29 on Thursday, 13 May 2021 09:34 BST

Django29
Hello
How can we place a small image in a text ?
For example :
Have a look to our partner site (and the logo just after "site" with a link to the site of this partner).

The image must stay exactly at this place in the sentence, even when the browser sizes are changed.

Ryan
The best way to do this might be with css and a backround-image style for the logo. Something like this could be added to your template stylesheet:

.partner_logo{}

.partner_logo::after {
    background: url('../../../images/logo.png') no-repeat center;
    margin-left: 0.5em;
    content: "";
    display: inline-block;
    height: 30px;
    width: 100px;
}
Then when you create the link, select the "partner_logo" class from the Classes list in the Advanced tab. The image will still wrap if the screen size is smaller than the text + logo.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

Django29
When I create the link on what ? The logo already placed in the editor ?
I put this css in the custom.css, but it's not in the list of the field /Advanced/Classes.

Ryan
I've found an easier way to do this using Columns.

In the editor create 2 Columns using the following settings:

Columns: 2
Stack Width : Small
Gap Size : None
Layout : 2-1

Then, type in the text in the left column, and insert the logo in the right, eg:

https://cdn.joomlacontenteditor.net/tmp/107799-placing-an-image-in-a-text.gif

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

Django29
I tried this solution, but almost impossible to have the text aligned on the left of the article, and the image close to the end of text. But it's OK for the current case.

It would be an idea of small improvement for the next version, because we have sometimes to use the logo of a brand or an icon in a sentence.