View Single Post
  #4  
Old 04-18-2008, 12:02 PM
  kube's Avatar 
kube kube is offline
 

X-Adept
  
Join Date: Sep 2005
Location: London: a small place East of Wales
Posts: 529
 

Default Re: Font sizes in WYSIWYG

Although I wouldn't recommend using the wysiwyg; a quick way around this, so that you can have your own font sizes within the wysiwyg editor, would be to change these two .js files below...

skin1/modules/HTML_Editor/editor.js
skin1/modules/HTML_Editor/moz/editor.js

and locate these lines of code in both of them...
Code:
if(f.size==1)nSize="8pt"; else if(f.size==2)nSize="10pt"; else if(f.size==3)nSize="12pt"; else if(f.size==4)nSize="14pt"; else if(f.size==5)nSize="18pt"; else if(f.size==6)nSize="24pt"; else if(f.size>=7)nSize="36pt";

and change them to the size you like, for instance (these sizes below are NOT in relation to the equivalent size in pt's)...
Code:
if(f.size==1)nSize="0.8em"; else if(f.size==2)nSize="0.9em"; else if(f.size==3)nSize="1em"; else if(f.size==4)nSize="1.2em"; else if(f.size==5)nSize="1.4em"; else if(f.size==6)nSize="1.6em"; else if(f.size>=7)nSize="2.0em";

I haven't tested this thoroughly but it doesn't appear to be conflicting with anything else within the js and outputs just the same. The em's I have introduced to show that over units are possible. You could just as easily swap...

else if(f.size==3)nSize="12pt"; to else if(f.size==3)nSize="11pt";

...if needs be - for size 3 to come up as 11pt's.

Hope this helps.
__________________
Doms
kube v4.1.9
Reply With Quote