-O-
Kilo Patron

!!! This no longer works !!!

 

As far as I can see the only way to customize the toolbar is by crafting an (let's call it TinyMCE Options) widget and add that widget either to the Catalog Items page or as a variable of type Custom. The widget only needs the Client controller in which a callback is configured with the help of provider uiTinymceConfig:

 

api.controller = function (uiTinymceConfig) {
	uiTinymceConfig.setup = uiTinymceConfigSetup;

	function uiTinymceConfigSetup (ed) {
		ed.settings.toolbar = ["undo redo",
			//"formatselect",
			//"bold italic",
			//"alignleft aligncenter alignright alignjustify",
			//"bullist numlist outdent indent",
			//"link unlink",
			//"image",
			//"codesample code",
		].join(' | ');
	}
};

 

I have crafted such a Widget, have added to the Catalog Item page () and the result is that now the HTML editor only displays the two buttons not commented out:

2023-01-07-2.png

If I uncomment

 

			//"alignleft aligncenter alignright alignjustify",

 

I get those buttons too:

2023-01-07-3.png

 I guss if you want to set this globally, you can add the widget to the Catalog Item page, or if you want to set the options per Catalog Item, you can use Catalog Item specific configuration widgets. Or craft some mechanism where the configuration is kept in an instance table and the widgets looks it up and applies it when and if so configured.