11-06-2011, 08:28 AM
This modification is for previewing font family and size in the font and size dropdown list in the editor (hopefully ).
- Manual Edit:
jscripts/editor.js
Find:
Javascript Codethis.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 Codethis.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>';
[attachment=620]
Find:
Javascript Codethis.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 Codethis.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>';
- Using Patches plugin:
[attachment=622]