Font Family And Size Preview In Editor
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #1
Font Family And Size Preview In Editor
This modification is for previewing font family and size in the font and size dropdown list in the editor (hopefully Biggrin).
  • Manual Edit:
    jscripts/editor.js
    Find:

    Javascript Code
    1
    2
    3
    4
    5
    6
    7
    this.fonts["Arial"] = "Arial";
    this.fonts["Courier"] = "Courier";
    this.fonts["Impact"] = "Impact";
    this.fonts["Tahoma"] = "Tahoma";
    this.fonts["Times New Roman"] = "Times New Roman";
    this.fonts["Trebuchet MS"] = "Trebuchet MS";
    this.fonts["Verdana"] = "Verdana";


    Replace with:

    Javascript Code
    1
    2
    3
    4
    5
    6
    7
    this.fonts["Arial"] = '<span style="font-family: Arial; font-size: 14px;">Arial</span>';
    this.fonts["Courier"] = '<span style="font-family: Courier; font-size: 14px;">Courier</span>';
    this.fonts["Impact"] = '<span style="font-family: Impact; font-size: 14px;">Impact</span>';
    this.fonts["Tahoma"] = '<span style="font-family: Tahoma; font-size: 14px;">Tahoma</span>';
    this.fonts["Times New Roman"] = '<span style="font-family: Times New Roman; font-size: 14px;">Times New Roman</span>';
    this.fonts["Trebuchet MS"] = '<span style="font-family: Trebuchet MS; font-size: 14px;">Trebuchet MS</span>';
    this.fonts["Verdana"] = '<span style="font-family: Verdana; font-size: 14px;">Verdana</span>';


       

    Find:

    Javascript Code
    1
    2
    3
    4
    5
    6
    7
    this.sizes["xx-small"] = this.options.lang.size_xx_small;
    this.sizes["x-small"] = this.options.lang.size_x_small;
    this.sizes["small"] = this.options.lang.size_small;
    this.sizes["medium"] = this.options.lang.size_medium;
    this.sizes["large"] = this.options.lang.size_large;
    this.sizes["x-large"] = this.options.lang.size_x_large;
    this.sizes["xx-large"] = this.options.lang.size_xx_large;


    Replace with:

    Javascript Code
    1
    2
    3
    4
    5
    6
    7
    this.sizes["xx-small"] = '<span style="font-size: xx-small;">'+this.options.lang.size_xx_small+'</span>';
    this.sizes["x-small"] = '<span style="font-size: x-small;">'+this.options.lang.size_x_small+'</span>';
    this.sizes["small"] = '<span style="font-size: small;">'+this.options.lang.size_small+'</span>';
    this.sizes["medium"] = '<span style="font-size: medium;">'+this.options.lang.size_medium+'</span>';
    this.sizes["large"] = '<span style="font-size: large;">'+this.options.lang.size_large+'</span>';
    this.sizes["x-large"] = '<span style="font-size: x-large;">'+this.options.lang.size_x_large+'</span>';
    this.sizes["xx-large"] = '<span style="font-size: xx-large;">'+this.options.lang.size_xx_large+'</span>';


       




11-06-2011 08:28 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #2
RE: Font Family And Size Preview In Editor
Thanks for the patches file, saved me some time Tongue

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
12-01-2011 02:16 PM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: