Hello,
I am using a custom styles set via Wygwam (a CKEdtior for ExpressionEngine).
I have defined a series of span classes for colors like so:
When highlighting text in a Wygwam (CKEditor) field and selecting one of these styles, the span is wrapped correctly around the selected text.
The behavior that I find odd, is that when re-selecting the text with a style selected (that previously placed the span class around the text) and changing the style, instead of removing the previous span code around that text and replacing it with the new one, it actually nests the code.
An example:
First style span applied:
After re-selecting the same text and changing the style to a different class:
Is this expected behavior? Am I missing something?
Any help is appreciated. Thanks!
I am using a custom styles set via Wygwam (a CKEdtior for ExpressionEngine).
I have defined a series of span classes for colors like so:
{ name: 'Blue', element: 'span', attributes: { 'class': 'color-blue' } }, { name: 'Blue - Electric', element: 'span', attributes: { 'class': 'color-blue-electric' } }, { name: 'Red', element: 'span', attributes: { 'class': 'color-red' } }
When highlighting text in a Wygwam (CKEditor) field and selecting one of these styles, the span is wrapped correctly around the selected text.
The behavior that I find odd, is that when re-selecting the text with a style selected (that previously placed the span class around the text) and changing the style, instead of removing the previous span code around that text and replacing it with the new one, it actually nests the code.
An example:
First style span applied:
Fusce dapibus, <span class="color-blue">tellus ac cursus commodo</span>, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
After re-selecting the same text and changing the style to a different class:
Fusce dapibus, <span class="color-red"><span class="color-blue">tellus ac cursus commodo</span></span>, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
Is this expected behavior? Am I missing something?
Any help is appreciated. Thanks!
Same problem
Hello,
I know this is an old post, but I have exactly the same problem.
Does anyone have any information on this ?