Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Font sizes in WYSIWYG

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-13-2008, 03:42 PM
 
rrmccabe rrmccabe is offline
 

Senior Member
  
Join Date: Aug 2004
Posts: 110
 

Default Font sizes in WYSIWYG

Running X-Cart 4.1.9 and with the template we are running the font size goes from super small to slightly larger than I would like when using the WYSIWYG editor. Like size 3 to size 4.

I would assum that is a function of a CSS sheet. Is that right?

Thanks

Rich
__________________
Rich McCabe
Iowa Web Hosting.com
Operating multiple versions of X-cart (linux)
Reply With Quote
  #2  
Old 04-13-2008, 04:10 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Font sizes in WYSIWYG

View the source, see what formatting tags it is adding.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 04-18-2008, 06:16 AM
 
rrmccabe rrmccabe is offline
 

Senior Member
  
Join Date: Aug 2004
Posts: 110
 

Default Re: Font sizes in WYSIWYG

The source shows <span style="FONT-SIZE: 14pt">This is a pre-purchase agreement. For $10.00 you get on the official first list. Be the first at your track to own one. This is the first major manufacturer 100% ready 1/8 scale kit entirely designed in the United States. Pictures are of prototype only. Slight variations may exist with mass manufacturing. See Details. </span>

In the WYSIWYG the nex size down seems to set the font to 10??

Thanks
__________________
Rich McCabe
Iowa Web Hosting.com
Operating multiple versions of X-cart (linux)
Reply With Quote
  #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
  #5  
Old 04-19-2008, 09:40 AM
 
rrmccabe rrmccabe is offline
 

Senior Member
  
Join Date: Aug 2004
Posts: 110
 

Default Re: Font sizes in WYSIWYG

Thanks Doms, But if I dont want to do wysiwyg how do I bump up the default size for description field text?
__________________
Rich McCabe
Iowa Web Hosting.com
Operating multiple versions of X-cart (linux)
Reply With Quote
  #6  
Old 04-21-2008, 12:04 AM
  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

Quote:
Originally Posted by rrmccabe
if I dont want to do wysiwyg how do I bump up the default size for description field text?

Within the default editor, to bump a portion of text, you could add a span and give it a style with a font size in percent. For example...

<span style="font-size:120%;">text</span>

However, if you meant how do you get a consistent fixed font size for the description text on all the product pages. Then...

Open up skin1/customer/main/product.tpl and locate...
<td>{if $product.fulldescr ne ""}{$product.fulldescr}{else}{$product.descr}{ /if}</td>

and add a class to the TD, for example, .descrtxt...
<td class="descrtxt">{if $product.fullde...

Then open up skin1/skin1.css and add the new class...
Code:
.descrtxt { font-size:2em; /* The font-size of your choosing */ }

Still within skin1/skin1.css, locate at the top of the document the following grouped selectors (on one line) and /* comment out */ the font-size like so (whatever the font-size value is)...
Code:
BODY,DIV,TH,TD,P,INPUT,SELECT,TEXTAREA,TT { /* FONT-SIZE: 10px;*/ }

Then a little further down locate the following grouped selectors (on one line) and add the default font-size for the rest of the content...
Code:
HTML,BODY { FONT-SIZE: 10px; /* default font-size for rest of content - add to existing code */ }

Hope this helps.
__________________
Doms
kube v4.1.9
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:05 PM.

   

 
X-Cart forums © 2001-2020