newbthenewbd / grav-plugin-tinymce-editor

TinyMCE Editor Integration Plugin for Grav
Other
60 stars 10 forks source link

Select default font family #16

Closed nguyenchihien closed 6 years ago

nguyenchihien commented 6 years ago

Hi! The font selector is a interesting function. It helps me alot in my posts. But I wanna change "default font" into "Tahoma", currently it's "Verdana" If can, also change the others default parameter : font size, color , bold/ italic ....... Thank you!

newbthenewbd commented 6 years ago

You could append a content_style parameter under parameters in tinymce-editor.yaml, like this:

parameters:
  -
    name: fontsize_formats
    value: '6pt 7pt 8pt 9pt 10pt 11pt 12pt 13pt 14pt 15pt 16pt 18pt 20pt 22pt 24pt 26pt 28pt 32pt 36pt 40pt 44pt 48pt 54pt 60pt 66pt 72pt 80pt 88pt 96pt'
  -
    name: paste_data_images
    value: '1'
  -
    name: content_style
    value: '.mce-content-body{font:48pt Tahoma, sans-serif}'

This enables You to modify the CSS styles used by TinyMCE. To actually default to a font in a theme, though, You'll have to modify the theme's CSS - likewise, the default Verdana font isn't actually used by the pages until manually set using the selector.