fckconfig.js // ORIGINAL // FCKConfig.FontSizes = '1/xx-small;2/x-small;3/small;4/medium;5/large;6/x-large;7/xx-large' ; FCKConfig.FontSizes = '1/5;2/6;3/7;4/8;5/9;6/10;7/11;8/12;9/14;10/16;11/18;12/20;13/24;14/28;15/30;16/60;17/90' ; fck_othercommands.js FCKFontSizeCommand.prototype.Execute = function( fontSize ) { //ORIGINAL // if ( typeof( fontSize ) == 'string' ) fontSize = parseInt(fontSize, 10) ; // // if ( fontSize == null || fontSize == '' ) // { // // TODO: Remove font size attribute (Now it works with size 3. Will it work forever?) // FCK.ExecuteNamedCommand( 'FontSize', 3 ) ; // } // else { // FCK.ExecuteNamedCommand( 'FontSize', fontSize ) ; // } // CHANGED CODE var oSel = null; var bHasSelection = false; if ( typeof( fontSize ) == 'string' ) fontSize = parseInt(fontSize, 10) ; var e = FCK.EditorDocument.createElement( 'SPAN' ) ; if ( fontSize == null || fontSize == '' ) { e.style.fontSize = '3px'; } else { e.style.fontSize = fontSize + 'px'; } try{ if(document.all) { oSel = FCK.EditorDocument.selection ; // ie bHasSelection = !(oSel.type == "None"); } else { oSel = FCK.EditorWindow.getSelection() ; // gecko bHasSelection = (oSel && oSel.rangeCount == 1 && oSel.getRangeAt(0).cloneContents().childNodes.length > 0); } } catch (e) {} if( bHasSelection ) { //if (FCK.EditorDocument.setSelectionRange) if (document.selection && document.selection.createRange) { // IE code goes here var range = FCK.EditorDocument.selection.createRange(); e.innerHTML = FCK.EditorDocument.selection.createRange().text; } else { FCK.EditorWindow.getSelection() ; e.innerHTML = FCK.EditorWindow.getSelection(); } FCK.InsertElement( e ); } }