Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Disable Font size

AmitGupta
Collaborator III

Hi Folks,

 

Does anyone have the custom object to disable the font size, font type from text area field ? Can a unique font size be maintained so that user cant update the text with multiple fonts ?

 

Thanks,

4 REPLIES 4

DavidPetty
Archer Employee
Archer Employee

Amit, see if this works.

<style>
#mceu_39-body {
display: none !important;
}
</style>
‍‍‍‍‍

 Advisory Consultant

Hi David,

The code completely disable the font , can i give user only to select  only 1 font , say "Arial"  but not to choose other fonts .

I would be interested in the solution as well - When copy pasting often different fonts or sizes occur. @DavidPetty  do you have a solution for that?

archer_scripts
Contributor III

The Archer Advanced Rich Text editor is powered by a commercial library called TinyMCE, you can find their documentation on how to limit the font selection or other UI controls, it's very powerful and you can basically highly customize it per application via Custom Object.

We've customized it previously for a client with a fixed font family and font size, and when the content is empty in a certain condition, add placeholder text as a template for the end-users to fill out. Cannot share the code since it's customized to that specific client but I can describe the general steps:

1. Create a custom object that will only run in edit mode.

2. Find the Archer code that sets the default settings for TinyMCE, it's inside the Javascript file of `ArcherTech.UI.RichTextEditor` class, and called `setDefaultTinyMCESettings`, and inside this function's content, there's `tinyMCE.init` with all those default settings, such as font_format, you can create a new font_format that only contains the ones you needed, and override this `setDefaultTinyMCESettings`.

3. This will run before the user gets into the active state of any TinyMCE instance and your overridden settings will be picked up.


Innovative solutions for RSA Archer, at archerscripts.com