MyBB Community Forums

Full Version: [Tutorial] Preview Fonts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[Image: attachment.php?aid=8]
This tutorials shows you how to preview fonts in the drop-down menu while posting, so you know what they look like.

Open jscripts/editor.js

Find:

Code:
        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:

Code:
        this.fonts["Arial"] = "<span style='font-family: Arial;'>Arial</span>";
        this.fonts["Courier"] = "<span style='font-family: Courier;'>Courier</span>";
        this.fonts["Impact"] = "<span style='font-family: Impact;'>Impact</span>";
        this.fonts["Tahoma"] = "<span style='font-family: Tahoma;'>Tahoma</span>";
        this.fonts["Times New Roman"] = "<span style='font-family: Times New Roman;'>Times New Roman</span>";
        this.fonts["Trebuchet MS"] = "<span style='font-family: Trebuchet MS;'>Trebuchet MS</span>";
        this.fonts["Verdana"] = "<span style='font-family: Verdana;'>Verdana</span>";

And you're done!
My dear, this is not the right forum for posting this thread. On the other hand, why do you call it a tutorial? Huh
(05-22-2009 12:51 PM)maatty Wrote: [ -> ]My dear, this is not the right forum for posting this thread.

Err yes, it is. (read the sticky)

(05-22-2009 12:51 PM)maatty Wrote: [ -> ]On the other hand, why do you call it a tutorial?

It explains how to do something, therefore, by definition, it is a tutorial.
It just shows the fonts like that see in the frontpage or any other html editor,
Good Tutorial Smile
Good Tutorial
A must feature in 1.6!
waov its really small one but its useful thx
good tutorial and very useful!!

thanks!!!
Reference URL's