XF 1.2 Adding new fonts to Redactor

Status
Not open for further replies.
I need to change fonts in Redactor (Font Family) with some that support Arabic. In Tinymce I did that by editing this file: js/tinymce/themes/xenforo/editor_template.js

Now with Redactor, i don't find where to make changes. There's no font names in: js/redactor/redactor.js !
 
Mike...

So much help!

I am to edit this....???

Great! Looks super easy!!

LOL

I have been searching this forum for over 40 minutes now, and have money for any help or add-on, but....?

Getting pissed off at any search results for simply adding a font.

Why does this need to be so difficult??

I give up. Wasted $200 of my time now with no results.
 
You will need to edit the .js file to add new fonts.

The file you are looking at is minified.
The full version is js/xenforo/full/bb_code_edit.js

Code:
var fonts = {
    'Arial': "arial,helvetica,sans-serif",
    'Book Antiqua': "'book antiqua',palatino,serif",
    'Courier New': "'courier new',courier,monospace",
    'Georgia': "georgia,palatino,serif",
    'Tahoma': 'tahoma,arial,helvetica,sans-serif',
    'Times New Roman': "'times new roman',times,serif",
    'Trebuchet MS': "'trebuchet ms',geneva,sans-serif",
    'Verdana': "verdana,geneva,sans-serif"
};

I recommend editing the full file and then running it through a minifier, something like: http://closure-compiler.appspot.com/home

Or you can edit the minified version like so:
Rich (BB code):
{Arial:"arial,helvetica,sans-serif","Book Antiqua":"'book antiqua',palatino,serif","Courier New":"'courier new',courier,monospace",Georgia:"georgia,palatino,serif",Tahoma:"tahoma,arial,helvetica,sans-serif","Times New Roman":"'times new roman',times,serif","Trebuchet MS":"'trebuchet ms',geneva,sans-serif",
Verdana:"verdana,geneva,sans-serif","Comic Sans MS":"'comic sans ms'"}

upload_2015-2-18_0-42-7.webp

Ranting and complaining as you have won't actually achieve much, especially when the information you required was already available in the other thread you posted in first.
 
That IS the full version.

I pulled it out of server. YES, it is the
js/xenforo/full/bb_code_edit.js

There is only One, and that is it...!??

Opened in notepad.

That is it.

No other file to open and edit! :mad:

So, there is no add-on or easy way to add a font eh?

That's BOGUS!
 
As noted in the other thread, this involves editing code directly. If you're not comfortable with what this entails -- and we wouldn't recommend it from an official support perspective -- you may wish to commission a third-party developer to develop a solution that fits your needs specifically or to make the necessary modifications on your behalf.

(Again, from an official support perspective, direct file edits are never recommended.)
 
Brogan mention an add-on.

Please, what was he talking about??

It does not exist, or what?

If no, then why did he bother to mention it in another thread??

Where is the link to this add-on to help me install a font?

Why is this so hard to do in the year 2015??
 
He said it would require custom development or an add-on. It is not doable with the built-in functionality and that is what we (as support) can really comment on. That is all his post was saying.

He did not reference a specific add-on. I don't know if there's an add-on that would do what you want. If there isn't, then you may wish to hire someone to create what you need.

If this is an important feature for you, you should post about it in suggestions. I searched and I only found one reference to defining custom editor fonts and it was made in 2010 and received no support from any other users. It doesn't appear to be something that has a strong demand.
 
What I read does not tell me that.

It read in English exactly as he write.

He mention an add-on, and that does not exist.

I waste time looking for it.

I have software developer here now working on this.

Even he say instructions on this forum are not good for adding a font to my forum.

??

Don't know what else to say, other than thanks for ??

There are instructions here that are not correct.

If someone can help me then great!
 
You will need to edit the .js file to add new fonts.

The file you are looking at is minified.
The full version is js/xenforo/full/bb_code_edit.js

Code:
var fonts = {
    'Arial': "arial,helvetica,sans-serif",
    'Book Antiqua': "'book antiqua',palatino,serif",
    'Courier New': "'courier new',courier,monospace",
    'Georgia': "georgia,palatino,serif",
    'Tahoma': 'tahoma,arial,helvetica,sans-serif',
    'Times New Roman': "'times new roman',times,serif",
    'Trebuchet MS': "'trebuchet ms',geneva,sans-serif",
    'Verdana': "verdana,geneva,sans-serif"
};

I recommend editing the full file and then running it through a minifier, something like: http://closure-compiler.appspot.com/home

Or you can edit the minified version like so:
Rich (BB code):
{Arial:"arial,helvetica,sans-serif","Book Antiqua":"'book antiqua',palatino,serif","Courier New":"'courier new',courier,monospace",Georgia:"georgia,palatino,serif",Tahoma:"tahoma,arial,helvetica,sans-serif","Times New Roman":"'times new roman',times,serif","Trebuchet MS":"'trebuchet ms',geneva,sans-serif",
Verdana:"verdana,geneva,sans-serif","Comic Sans MS":"'comic sans ms'"}

View attachment 98667

Ranting and complaining as you have won't actually achieve much, especially when the information you required was already available in the other thread you posted in first.


no.

The correct file to edit is js/xenforo/bb_code_edit.js

not in full folder. Yes, there is also the same name file in the "Full" folder, but that is not correct to modify.


You are welcome to fix the instructions!

I hope to save others time and frustration adding a font.
 
Last edited:
My name is Luciano I work as a software developer and on my server both files are minified...
I add the font only on js/xenforo/bb_code_edit.js and works fine, I tried before to follow the instructions editing only on js/xenforo/full but did not work...
I think the right way to do is modify the bb_code_edit.js on js/xenforo/full folder than minify this file and copy it to js/xenforo/ folder?
Is that right?
 
and I am Scott.....

I asked Luciano (employee) to look at this problem.

He found the problem.

The instructions as posted did not work.

We modified another file and that works.

??

OK guys? and Both were already minified. 100% positive about this.


Changing the "js/xenforo/bb_code_edit.js" = success!

Change "js/xenforo/full/bb_code_edit.js" = not work.

the end.

again, you are welcome! LOL
 
and I am Scott.....

I asked Luciano (employee) to look at this problem.

He found the problem.

The instructions as posted did not work.

We modified another file and that works.

??

OK guys? and Both were already minified. 100% positive about this.


Changing the "js/xenforo/bb_code_edit.js" = success!

Change "js/xenforo/full/bb_code_edit.js" = not work.

the end.

again, you are welcome! LOL
Someone must have replaced js/xenforo/full/bb_code_edit.js on your site with a minified version - it is supposed to be a full version of the js file, I've checked.

You were recommended to edit the
js/xenforo/full/bb_code_edit.js file as it is easier to edit. Then you minify that file, as per the instructions, and replace the
js/xenforo/bb_code_edit.js file with the edited one.

Simple really. I could understand this and I'm not a software developer. :)
 
uh-huh..

No that is not what the instructions say at all.

Nowhere does it say to replace or edit the correct file, which is in js/xenforo/bb_code_edit.js file

Only talk about the One in the Full folder and modifying that did not work.

I can read. It does not say that at all.


So, again.....the correct file that needs to be replaced or edit is js/xenforo/bb_code_edit.js file

That is missing from the instructions above. There is no debate about it. It is right there for all to read.

I can tell you nobody mess with the file in the Full folder ever!
It was already minified.
 
Status
Not open for further replies.
Back
Top Bottom