TinyMCE 2.9.12 use custom font in backend

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Guido
Forum Members
Forum Members
Posts: 221
Joined: Sat Aug 29, 2009 3:00 pm

TinyMCE 2.9.12 use custom font in backend

Post by Guido »

Hi,

I'm building a website using TinyMCE as my backend editor, and I use a custom font that I saved on the server and import via the stylesheet. Now I would like to use this custom font also in TinyMCE on the backend to make the backend editor as representative as possible.

I've googled this for quite some time, I found a lot on how to do this in Wordpress and I found an 'advanced_font_plugin', but since TinyMCE has been modified for CMSMS I noticed that the structure of the files and folders is not the same as the original.

Does anyone know how to do this for TinyMCE within CMSMS?
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1978
Joined: Mon Jan 29, 2007 4:47 pm

Re: TinyMCE 2.9.12 use custom font in backend

Post by Jo Morg »

"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Guido
Forum Members
Forum Members
Posts: 221
Joined: Sat Aug 29, 2009 3:00 pm

Re: TinyMCE 2.9.12 use custom font in backend

Post by Guido »

Thanks! I'll check it out..
10010110
Translator
Translator
Posts: 224
Joined: Tue Jan 22, 2008 9:57 am

Re: TinyMCE 2.9.12 use custom font in backend

Post by 10010110 »

Yeah, I brought that up in the other topic just recently but somehow it turned out that the solution I seemed to have didn’t work anymore at some point. I don’t know why it worked in the first place (or didn’t anymore later) but I’ve also submitted a bug report at http://dev.cmsmadesimple.org/bug/view/9927 which explains things a little more.

Now, what I eventually settled with in the meantime is to remove the [[root_url]] variable completely for my font paths and just used a server-independent absolute path (i. e. starting with a slash: “/fonts/example.woff”), and put a copy of the fonts directory into the TinyMCE directory. This definitely works but feels a bit like a workaround that could be avoided.
Guido
Forum Members
Forum Members
Posts: 221
Joined: Sat Aug 29, 2009 3:00 pm

Re: TinyMCE 2.9.12 use custom font in backend

Post by Guido »

I just tried it on background images I used on :before and :after pseudo classes. It still works there (the ../../ solution). But you're right, It doesn't work for importing custom fonts...
Post Reply

Return to “Modules/Add-Ons”