I am trying to use styles for setting font sizes rather than <font> tags but have been hitting some major brick walls.
The problem that I'm having is when styles are nested. e.g. <span class='small'>this is my <span class='medium'>Example</span> Code.</span>'
Once you have added multiple styles to a line of text there is no way to change the overall style of the text without first removing the nested style. I can understand why this would be useful but for my need I would like to remove any nested styles when I apply a style to a selection.
I have looked through the forums to try and find a solution to this problem but haven't come across any solutions. Is there anybody out there that has made any modification to the scripts that would allow this to happen or somebody that might be able to point me in the general direction of how I might achieve this?
Also, is there any way to retain the selection once you have applied a style? At present you have to keep reselecting the text to change the style.
Thanks in advance for any help you can offer.
The problem that I'm having is when styles are nested. e.g. <span class='small'>this is my <span class='medium'>Example</span> Code.</span>'
Once you have added multiple styles to a line of text there is no way to change the overall style of the text without first removing the nested style. I can understand why this would be useful but for my need I would like to remove any nested styles when I apply a style to a selection.
I have looked through the forums to try and find a solution to this problem but haven't come across any solutions. Is there anybody out there that has made any modification to the scripts that would allow this to happen or somebody that might be able to point me in the general direction of how I might achieve this?
Also, is there any way to retain the selection once you have applied a style? At present you have to keep reselecting the text to change the style.
Thanks in advance for any help you can offer.
Re: A question about nested styles.
Thanks.
Re: A question about nested styles.
I think you should remove the format of the selection before setting a style inside another.

This could be done most safely by the users pressing the "RemoveFormat" button before setting a style
The other solution is calling the RemoveFormat command automatically before every style-setting.
You should insert the
code into the fckstylecommand.js somewhere here: