newbthenewbd / grav-plugin-tinymce-editor

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

Update tinymce-editor.yaml #44

Closed E-Haci closed 4 years ago

E-Haci commented 4 years ago

It would be great to have valid_elements in config file. It would allow use to limit/extend valid_elements list.

newbthenewbd commented 4 years ago

Is there any measurable benefit in adding this parameter to the default config file, instead of parameters in the user-specified copy when willing to modify, like below?

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: valid_elements
    value: ''

If valid_elements has a default non-null value, as seems to be the case, and there was no way to modify that value without directly editing that parameter, it could indeed find use in the default config file, although if outside parameters, it should then use some sugar - it seems that formatting it akin to the plugins parameter would be a good fit, if still a bit messy at 72 lines.

But it seems to me that for the purposes of slightly altering the list, the parameters invalid_elements and extended_valid_elements may be used, leaving valid_elements to those who really mean to replace the whole thing, not quite the common usage - or am I wrong in that matter? (speaking of which, not that I know for sure, but wouldn't the proposed value, like, block everything? :smile:)

E-Haci commented 4 years ago

Thank you for explanation. You are absolutely right :) It is my bad, i didn't know we can simply pass init parameters via parameters section of user/config/plugins/tinymce-editor.yaml - i have just tested it, it works like a charm. Thanks for great plugin. Have a nice day.