Hello,
I'm working on an app that uses TinyMCE. I need to change the default font stack.
Please let me know about How to change the content_css.
According to TinyMCE documentation.
↓
default_font_stack
This option changes the default font stack that is considered as the "System Font" stack in the fontfamily toolbar and menu items. It’s should be an array of font family names that matches the default fonts in the the configured content_css CSS file.
Regards,
Hi @Yasuyuki Fukita
You can configure content_css directly inside the JS config where TinyMCE is initialized in your OS block. Add a custom stylesheet under Data > Resources (set deploy action to Deploy to Target Directory) or use an external URL/CDN link.
In your initialization config, add the content_css property pointing to that file path.
If you are using a forge like TinyMCE Reactive, check the block's input parameters, most expose an AdvancedOptions or ConfigJson string where you can pass "content_css": "..." as part of the JSON object.
Hope this helps!
BR,
Abhinav
Hi Abhinav
Thank you for your reply.
Could you please give me more details?
I want to know how to write CSS correctly.
"body" Is correct?
body {
font-family: "Andale Mono", andale mono, times, serif;
}
javascripttinymce.init({
selector: 'textarea',
content_css: '/path/to/your/custom_content.css',
font_family_formats: 'Andale Mono=andale mono,times; ' +
'Arial=arial,helvetica,sans-serif'
});