tinymce / tinymce-angular

Official TinyMCE Angular Component
MIT License
324 stars 93 forks source link

Custom font(.woff) not working within the editor #124

Closed Baelx closed 4 years ago

Baelx commented 4 years ago

What is the current behavior? Custom font hosted locally which are loaded in to the editor seem to render into the font-select area but not in the editor body itself. Instead, it appears custom fonts revert to Times New Roman by default even if font-select indicates the custom font it being used.

Please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox.io or similar.

What is the expected behavior? The editor module should use the specified font for text within the editor body.

Which versions of TinyMCE/TinyMCE-Angular, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or TinyMCE-Angular? Versions used:

Screenshot image

SimonFc commented 4 years ago

Hi @Baelx, When you're using TinyMCE in iframe mode you must make any css you wish your content to have available inside the iframe - you do this by using something we call content css. There're two options for this, the content_css option and the content_style option. If you add the same font-face declaration to your content css it should work alright. Let me know if this solves your problem!