Forums / Customization from the Admin / HTMLarea default fonts and styles

HTMLarea default fonts and styles

Locked
Results 1 to 5 of 5
This thread is locked. New replies are disabled.
20 Jun 2008, 09:25
#1
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Posts:
2,850
Plugin Contributions:
3

HTMLarea default fonts and styles

Hi,
I could not find any reference to this in the forum so here's an answer instead of a question. Apologies if I have reinvented the wheel for some of you..

I wanted to change the default styles, font, H1, H2 etc that HTMLarea uses to match my site ones, instead of times new roman.

To do this, open

\yourshop\editors\htmlarea\htmlarea.js

and on line 98 edit this.pageStyle to point to your stylesheet. The example here is for an install on a local machine,

//this.pageStyle = "";
this.pageStyle = "@import url('http://127.0.0.1/yourshop/includes/templates/yourtemplate/css/stylesheet.css');";

regards
Steve
30 Jun 2008, 01:32
#2
ultralowincome avatar

ultralowincome

New Zenner

Join Date:
Jun 2008
Posts:
11
Plugin Contributions:
0

Re: HTMLarea default fonts and styles

you shouldn't have to modify your javascript file to handle the css. can't you open the css file in includes/templates/CUSTOM/css and tweak it there? the CUSTOM folder being, well, a custom folder so you can override any changes without doing permanent damage to the site...
30 Jun 2008, 05:48
#3
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Posts:
2,850
Plugin Contributions:
3

Re: HTMLarea default fonts and styles

Hi,
I could not find any reference in the usual css file about htmlarea and as far as I can see, the HTML editor is a plug-in/add on bit of software and doesn’t know about the templates/overrides, hence I had to manually point it in the right direction to get that template css.

I am happy to stand and be corrected though, ignorance is not bliss!

Regards
Steve
30 Jun 2008, 05:54
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: HTMLarea default fonts and styles

torvista, there's nothing wrong with your approach.

ultralowincome clearly didn't fully read your post, or made some wrong assumptions when replying. Their reply is irrelevant to your post.
30 Jun 2008, 05:54
#5
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Posts:
4,572
Plugin Contributions:
0

Re: HTMLarea default fonts and styles

No problem, Steve. Looks like ultralowincome didn't realize you were referring to the Fonts used for HTML Editor.

Nice tip, BTW. :smile: