newbthenewbd / grav-plugin-tinymce-editor

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

Remove default paragraph #50

Closed arkanos closed 4 years ago

arkanos commented 4 years ago

Hi guys,

What would be the equivalent in YAML for removing the default paragraph tag?

According to this post: https://community.tiny.cloud/communityQuestion?id=90661000000MrbVAAS I need to use these parameters:

forced_root_block : '', force_br_newlines : true, force_p_newlines : false,

However, I'm struggling to make it work.

Thanks!

newbthenewbd commented 4 years ago

Just follow the format of parameters in user/config/plugins/tinymce-editor.yaml, e.g.:

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: forced_root_block
    value: '0'
  -
    name: force_br_newlines
    value: '1'
  -
    name: force_p_newlines
    value: '0'

If my memory serves, an empty value would effectively remove the parameter the next time the config is saved from within the admin panel, hence the 0 at forced_root_block, but I think that it should work the same.

arkanos commented 4 years ago

Thanks @newbthenewbd!

That made the trick.