datocms / plugins

Repository providing samples using the Plugins SDK
MIT License
33 stars 47 forks source link

[TinyMCE Editor] Allow to configure #95

Closed McNuggetSauce closed 1 year ago

McNuggetSauce commented 1 year ago

https://www.datocms.com/marketplace/plugins/i/datocms-plugin-tinymce-rich-text

It is the same DatoCMS uses internally but, since TinyMCE offers a great deal of customization, this plugin will help users configure their own editor.

I'd like to configure/customize the TinyMCE Editor plugin a bit further for our needs but it doesn't have any settings available. Is there a way to allow adding more options to it?

marcelofinamorvieira commented 1 year ago

Hello @McNuggetSauce

For the customisation you can't do it directly on the plugins interface, you have to fork it, and modify the init code for the Tiny editor according to your needs (following their documentation). You can then use that forked modified version of the plugin as your own customised field plugin.

The initialisation part is right here: https://github.com/datocms/plugins/blob/master/rich-text-tinymce/src/entrypoints/FieldExtension/index.tsx as the "ReactEditor" component.

McNuggetSauce commented 1 year ago

Thank you, @marcelofinamorvieira! I understand now. I'll just fork the plugin and publish a customized version for my needs.

Appreciate the response. Cheers!