how do i set font-size for "Tinymce" text editor

388 Views Asked by At

I am building an application where i used tinymce-rails gem.It's a nice text editor i am dealing with.But i am not able to set text's font size.Please help me out.

I have the below code in my tinymce.yml file:

default:
plugins:
- image
- link
alternate:
selector: textarea.table-editor
toolbar: styleselect | bold italic | undo redo | table
plugins:
- table
1

There are 1 best solutions below

0
rick On

Add this in your tinymce.yml and try,

setup : function(ed)
{
  ed.on('init', function() 
   {
      this.getDoc().body.style.fontSize = '50px';
   });
}

And change your font size according to your need and it works in tinymca 4.