19
Views
2
Comments
[Tiny Rich Text Editor 7] How to Apply custom CSS to the editor content area using content_css .
tiny-rich-text-editor-7
Reactive icon
Forge asset by Lucas Soares
Application Type
Reactive
Service Studio Version
11.55.89 (Build 65233)
Platform Version
11.44.0 (Build 48345)

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,

2026-09-14 17-26-59
Abhinav Shilwant

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


UserImage.jpg
Yasuyuki Fukita

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'

});


Regards,

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.