That's the problem unfortunately, you either need to wrap the img in another element or the whole block I'm afraid, you can't apply a style to just the image to do so.
There is a way to do this in the RTE with just a style however. When you insert an image in the rte and then apply a style from the styles dropdown, it wraps the image in span tag which it applies the class to, like below.
<p><span class="textwrap-right"><img src="/media/asnjritr/listings.png?width=150&height=150" alt="" width="150" height="150" data-udi="umb://media/a2889b026571450bb054d7b90f6a2399" /></span>How does it add the text</p>
because of this it is possible to achieve what you want by simply adding a couple of class styles to your css
the issue is that I'm using TinyMCEConfig.config instead of RTE.css for the config, do you have any experience with that? I'm trying to use your solution with the config.
TinyMCE right/left-align image
I'm learning how to modify the TinyMCE editor provided with Umbraco, and I'm following the directions on the following page:
https://our.umbraco.com/documentation/reference/config/tinymceconfig/
I'm adding format options to left, center, and right-align images,
for the format options I have the following:
and the css I have is:
but the left and right options have text around the images? what config/css do I need to align images without text wrapping?
I don't think you can with css, the text needs to be in a wrapper so you can clear the float
the problem is that this is all in a WYSIWYG editor, I cant know what the text will be or what wrapper itll be in.
That's the problem unfortunately, you either need to wrap the img in another element or the whole block I'm afraid, you can't apply a style to just the image to do so.
There is a way to do this in the RTE with just a style however. When you insert an image in the rte and then apply a style from the styles dropdown, it wraps the image in span tag which it applies the class to, like below.
because of this it is possible to achieve what you want by simply adding a couple of class styles to your css
the issue is that I'm using TinyMCEConfig.config instead of RTE.css for the config, do you have any experience with that? I'm trying to use your solution with the config.
for anyone else having the issue I had, here's my solution:
RET.css:
TinyMCEConfig.config:
cool, so adding the div block sorted it?
Yup!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.