Opened 11 years ago

Closed 11 years ago

#10611 closed Bug (invalid)

no property of "style=font-size" for default font size

Reported by: Chenyue Gao Owned by:
Priority: Normal Milestone:
Component: General Version: 3.6.4
Keywords: IBM Cc: gaoc@…


There is no property of style=font-size when the user first enter text with default font size. This problem can be reproduced with your demo.

first time enter text with default font size

< extensionDisplayName="RQM-KEY-TP-BUSS-OBJ-TITLE"> <div>this is a text with font size set to default 10</div> </>

Select the entire text and change the font size to 16 and save

< extensionDisplayName="RQM-KEY-TP-BUSS-OBJ-TITLE"> <div> <span style="font-size:16px;">; this is a text with font size set to default 10 and later changed to 16 </span> </div> </>

  1. Now change the font back to 10:

< extensionDisplayName="RQM-KEY-TP-BUSS-OBJ-TITLE"> <div> <span style="font-size:10px;">; this is a text with font size set to default 10 and later changed to 16 </span> </div> </>

Change History (2)

comment:1 Changed 11 years ago by Chenyue Gao

Cc: gaoc@… added

comment:2 Changed 11 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

When you insert code like <p>test</p> it has no styles defined and if there are no styles defined then the only thing that can and IMHO should style content is either contents.css or main css file in case of inline editor.

Plugins inserts font-size inline style when you use it. Editor should not make this by default. If you want to get such result either insert styled content or use below code

editor.on( 'instanceReady', function( evt )
						var d = evt.editor.document; 
						var r = new CKEDITOR.dom.range(d); 													
						r.selectNodeContents(d.getBody()); 			; 
						var style = new { element : 'span',  styles: { 'font-size': '10px' } } );
						style.type = CKEDITOR.STYLE_INLINE;
						style.applyToRange( r );
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy