Custom styles in the RTE don't overwrite each other
I have three custom styles in the styles dropdown to position images in the Rich Text Editor: Name: Image Left Alias: .imgLeft Styles: float: left; margin-right: 10px;
Name: Image Right Alias: .imgRight Styles: float: right; margin-left: 10px;
Now, when I set imgRight on a image, that works fine. However, if I then decide I want it to be imgLeft, it doesn't float left, instead it tacks on an extra class. So the class on my image is now: imgRight imgLeft.
How can I make the styles dropdown overwrite whatever style is on the selected element?
This used to work fine in Umbraco 4.0.x, what has changed in 4.5 (and WHY?).
Sorry I don't know the answer, however I have a similar problem using imageLeft and imageRight under 4.5.2
My classes are set up pretty much the same as yours, when I click an image and select either imageLeft or imageRight from the drop down I get this code:
Custom styles in the RTE don't overwrite each other
I have three custom styles in the styles dropdown to position images in the Rich Text Editor:
Name: Image Left
Alias: .imgLeft
Styles: float: left; margin-right: 10px;
Name: Image Right
Alias: .imgRight
Styles: float: right; margin-left: 10px;
Name: Image Centered
Alias: .imgCentered
Styles: display: block; margin-left: auto; margin-right: auto;
Now, when I set imgRight on a image, that works fine. However, if I then decide I want it to be imgLeft, it doesn't float left, instead it tacks on an extra class. So the class on my image is now: imgRight imgLeft.
How can I make the styles dropdown overwrite whatever style is on the selected element?
This used to work fine in Umbraco 4.0.x, what has changed in 4.5 (and WHY?).
Hey Sebastiaan,
Sorry I don't know the answer, however I have a similar problem using imageLeft and imageRight under 4.5.2
My classes are set up pretty much the same as yours, when I click an image and select either imageLeft or imageRight from the drop down I get this code:
Basically an extra span gets wrapped around the remaining text.
I have exactly the same set up in Umbraco 4.0.x and it works fine.
I used Chrome on both sites.
Rich
Thanks Rich, yes, I also get an extra span, also with the two classes.. :-(
Any progress on this, Sebastiaan?
I'm having trouble with this too... effectively doesn't work for me.
/Chriztian
OK - this works for me:
Creating a wysiwyg.css stylesheet for the RTE, with these rules in the top editable section:
Then I create the following rules (using right-click > Create...):
/Chriztian
Oh, and it's a real PITA to get the TinyMCE iframe to load the updated CSS file! Man I wasted long time before I realized what was going on...
/Chriztian
Is this still broke, or is it just me?
If I change the class from right to left for example I get <img class="imageright imageleft"/>
Also I'm sure when you used to highlight an image the options in the drop were only styles suitable for an image (ie H2, H3 wouldn't show).
Not loving the RTE today!
Rich
I also have this problem. .
is working on a reply...