Page 1 of 1

TinyMCE 2.9.12 use custom font in backend

Posted: Fri Mar 28, 2014 2:47 pm
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?

Re: TinyMCE 2.9.12 use custom font in backend

Posted: Fri Mar 28, 2014 2:56 pm
by Jo Morg

Re: TinyMCE 2.9.12 use custom font in backend

Posted: Fri Mar 28, 2014 3:56 pm
by Guido
Thanks! I'll check it out..

Re: TinyMCE 2.9.12 use custom font in backend

Posted: Fri Mar 28, 2014 9:58 pm
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.

Re: TinyMCE 2.9.12 use custom font in backend

Posted: Fri Jun 13, 2014 12:45 pm
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...