My website uses typekit to grab custom fonts, which works on the frontend.
I’d like to put this in my editor styles in the backend. However, I don’t know how I would do this. Typekit uses a js embed snippet rather than a css font-face embed snippet.
My website uses typekit to grab custom fonts, which works on the frontend.
I’d like to put this in my editor styles in the backend. However, I don’t know how I would do this. Typekit uses a js embed snippet rather than a css font-face embed snippet.
You must be logged in to post a comment.
Tom Nowell’s TinyMCE plugin solution works brilliantly, just update the JavaScript to use Typekit’s new async code. Once you use the new async embed code, the 403 problem disappears and you’ll have Typekit-enabled TinyMCE with no fuss!
Tom has put all the code together in a blog post. He did all the heavy lifting on this, so go give him some pageviews and read the specifics there!
I got around this by adding a tinymce plugin, it’s almost there but Im getting a 403 forbidden when it tries to retrieve the font css from typekit:
js:
PHP
You can enqueue the script for admin then it should be available for your editor.css
Edit:
Updated the code above for typekit since it requires some inline js like you mentioned. We also have to change the $hook variable to $pagenow since were not using admin_enqueue_scripts.