Hi all,
I performed a very simple test on CKEditor 4.x
I just wrote a word Test and then chose a font, size and color. Now I have three spans one in another for the three styles ...
<p><span style="color:#FF0000;"><span style="font-family:verdana;"><span style="font-size:9pt;">test</span></span></span></p>
Isn't that a curious case of spanitis (similar to divititis but with spans) ?
I mean, it could all fit in a single span perfectly, why add so much DOM elements ?
is there any way around this please ?
Thanks
This issue is tracked on our
This issue is tracked on our Development site as ticket #9295.
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!
First of all - using font
First of all - using font size, name and color dropdowns does not make sense from the semantical HTML POV. If you care about HTML you should use formats and styles (after configuring them to use classes).
Regarding "spanitis" - it is easier for us to create nested spans. You just tested the simplest case, but there is a dozen of ways how styles (not only spans, but also semantical elements) can be positioned to each other. This is already very complicated and with styles grouping it would be unpredictably more complex. And since we moved towards semantical HTML and we are promoting editors configured to produce it (check the standard preset's configuration) I think that it is unlikely that we'll spend weeks tuning spans grouping. They are just not worth this.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+