mitydigital / statamic-tinymce-cloud

A Statamic fieldtype for TinyMCE using Tiny Cloud for Statamic 3.3+ and Statamic 4.0
https://docs.mity.com.au/tinymce-cloud
MIT License
2 stars 1 forks source link

YAML configuration is not enough, because it does not support funtions, e. g. custom toolbar button, js configuration is also needed #7

Closed frankroc2022 closed 9 months ago

frankroc2022 commented 1 year ago

I want to add the character soft hyphen to the toolbar. More informations: https://www.tiny.cloud/docs/tinymce/6/custom-menu-toolbar-button/

I need the addMenuButton function for example.

martyf commented 1 year ago

Can you please install the latest dev version: composer require mitydigital/statamic-tinymce-cloud:dev-main

This now writes config to a file at /public/vendor/statamic-tinymce-cloud/config.js that includes a raw output of whatever you enter in to your configuration.

There is no longer any validation when saving config - it is the configurator's responsibility to ensure it is valid and correct.

Give this a whirl and let me know how you go.

Note that I am out of the office for the holidays now so will be slow to reply.

frankroc2022 commented 1 year ago

Big THX, I will test it. Happy holidays.

Edit: After installing the dev version, I cleared cache and everytime I edit a collection there is a popup with the following text: The Tiny Cloud config file could not be found. Make sure you have at least one configuration saved. I still use my old functional config. I will test a new configuration. My old functional config not work anymore.

martyf commented 1 year ago

Hey @frankroc2022 apologies for the delay - I didn't get notified that you edited your comment.

You need to re-create your config, and update your blueprints to use the new format. I'll need to work on an upgrade process.

I've just done a clean install using the dev branch, pasted a complex config, and have it running as expected.

image
martyf commented 9 months ago

Closed due to inactivity