Applying and removing the style works by selecting and deselecting (selecting it again) respectively.
In this case, after selecting the text "Touch" in the editor area, select "defaultSpan" class -> it will remove the respective span and will retain the span with "lead" class alone.
Actually I had a requirement where authors find difficult to findout the style they have authored earlier.
1. So Is there any way where this issue overcomes and author gets to know which style they have applied.
2. Is there a way that the style in the span class can get replaced instead of getting created a new one each time on style change.
Behaviour is per the functionality of OOB Styles Plugin. We can consider writing custom plugin to meet the requirement above.
- Either highlighting the style (in the dropdown) which is already applied (kinda means to know the style that is already applied) or
- when we select some style replace the existing one instead of creating new span with class.