Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,838
    Plugin Contributions
    31

    Default 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

  2. #2
    Join Date
    Jun 2008
    Location
    Los Angeles
    Posts
    11
    Plugin Contributions
    0

    Default 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...

  3. #3
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,838
    Plugin Contributions
    31

    Default 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

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default 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.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default 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.

 

 

Similar Threads

  1. v139h CKEditor default fonts
    By top hatt in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 18 Aug 2012, 04:02 PM
  2. How can I add fonts in HTMLarea?
    By ekele in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 10 May 2010, 03:24 PM
  3. Editor doesn't default to HTMLarea
    By high2K in forum General Questions
    Replies: 0
    Last Post: 27 May 2008, 10:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg