13

Does anyone see a way to make the TinyMCE 4 Font Sizes drop down offer font sizes in px instead of pt?

TinyMCE Font Sizes

Thanks

Steve
  • 4,534
  • 9
  • 52
  • 110
  • Maybe a better question is what is the advantage of its using pt instead of px? Why did they choose it? – NoBugs Jul 22 '15 at 23:21

1 Answers1

39

You need to use the fontsize_formats option where you can also change the unit of the values of the font sizes dropdown:

tinymce.init({
    selector: 'textarea',
    toolbar: 'fontsizeselect',
    fontsize_formats: "8px 10px 12px 14px 18px 24px 36px"
});

Demo JSFiddle.

nemesv
  • 138,284
  • 16
  • 416
  • 359
  • 1
    Beautiful! Thanks. Stackoverflow won't let me award the bonus points for another 18 hours, but they're yours! – Steve Feb 01 '15 at 20:30
  • 2
    2022 comment - now it's ```font_size_formats``` https://www.tiny.cloud/docs/tinymce/6/user-formatting-options/#font_size_formats – Black Beard Jul 29 '22 at 08:57