Iam really sorry for the title its a bit misleading but i don't really know how to describe it best.
Iam using the font-size plugin in a little modificated way. Id like to use a data-attribute instead of a wrapped span.
Here is how is add a fontsize for example: (same for the line-height)
CKEDITOR.config.fontSize_style = { element: 'p', attributes: { 'data-font-size': '#(size)' }, overrides: [ { element: 'p', attributes: { 'data-font-size': null } } ] };
So far so good since this i working very well. ( i know that its not possible to make one word bigger instead only the paragraph itself but thats how i wanted it)
Now if a user adds a WYSIWYG field (which is the editor), the editor gets called and starts with a littel sample text:
<h3>Hello iam CKEditor</h3> <p>Iam your first paragraph</p>
Now my problem and whats happening in chrome:
1. I cklick in the editor field and delete the h3 text. Whats left if i inspect with firebug is
<h3><br><h3>
2. If i now delete the line-break with pressing backspace in the editor and look at firebug, this happended:
<h3><span style="color: rgb(51, 51, 51); font-size: 18px; line-height: 32px;">Iam your first paragraph</span><br></h3>
Now i can't change my fontsize and lineheight anymore since the span always keeps it a 18px, i really don't know how that span happens to wrap the paragraph after deleting the heading which is obviously not deleted completely. Any ideas how to fix this?
ps: If i delete the heading and the line break in firefox the heading gets deleted completely and everything works well, it only happens in Chrome and Safari.
Any help would be great. :) Thanks a lot.