Fixing the HTML Editor Background

This forum is where we'll mirror posts that are of value to the community so they may be more easily found.
Post Reply
User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Fixing the HTML Editor Background

Post by AbleMods » Sun Aug 22, 2010 7:38 am

Introduction

You may have noticed by now that the background of the HTML Editor in AbleCommerce 7 will default to your store theme background. That's swell if you have a readable color set as your theme background, but bad if you have something more elegant. In some cases, you will find it nearly impossible to type or lay down content accurately with the background blending into everything.

This also becomes an issue when designing email templates. The email template routines use the same HTML editor as the store scriptlets.

This modification will force the HTML background to a blank white canvas. From there you can easily type both web and email content without your current site theme interfering with the visuals. Note that your site theme will still function as designed when the content is rendered.

Modification

Always make a backup of any store page file you're about to change.

Locate the /Admin/Utility/EditHtml/aspx page file and open it with your favorite text editor (ex Notepad). Once loaded, find this code in the file:

Code: Select all

    protected string EditorAreaCSS
    {
        get
        {
            string theme = GetStoreTheme();
            return this.Page.ResolveUrl("~/App_Themes/" + theme + "/style.css");
        }
    }
and replace it with this:

Code: Select all

    protected string EditorAreaCSS
    {
        get
        {
            string theme = GetStoreTheme();
            //return this.Page.ResolveUrl("~/App_Themes/" + theme + "/style.css");
            return "";
        }
    }
Now save the file and upload it to the proper folder on your website. The change will take effect immediately.

Conclusion

Once this change is in place, you will hav a nice and clean white canvas to build your HTML for both scriptlets and emails. Enjoy ! :)
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Post Reply