Closed marco-silvestri closed 8 months ago
update to last version then publish the view file. in view file find 'setup' variable and add your function here is an example:
setup: function(editor) { editor.ui.registry.addButton('custom-upload', { icon: 'upload', onAction: function () { editor.windowManager.open(upload_config) } }); },
don't forgot to add your custom button to config toolbars:
'profiles' => [ 'default' => [ 'plugins' => 'accordion autoresize codesample directionality advlist link image lists preview pagebreak searchreplace wordcount code fullscreen insertdatetime media table emoticons', 'toolbar' => 'custom-upload undo redo removeformat | styles | bold italic | rtl ltr | alignjustify alignleft aligncenter alignright | numlist bullist outdent indent | forecolor backcolor | blockquote table toc hr | image link media codesample emoticons | wordcount fullscreen', 'upload_directory' => null, ],
In the published view file there is no setup variable
@marco-silvestri in line 67
setup: null,
update to the latest version v1.1.3
Hi! It does not seem possible to add custom button to the editor. Is there any way to do so?