โ ๏ธ This is a fork of the original Nova Froala Field which has been archived! :warning
composer require wimski/nova-froala-field
See original README.md.
To add custom elements like buttons, icons or plugins, you can create separate scripts and load them in the editor.
See also the documentation: https://froala.com/wysiwyg-editor/docs/concepts/custom/button/
// config/froala-field.php
return [
'options' => [
'custom_elements' => [
'froala/custom-elements/buttons/my-custom-button.js',
],
],
];
// public/froala/custom-elements/buttons/my-custom-button.js
(function (FroalaEditor) {
FroalaEditor.RegisterCommand('MyCustomButton', {
// ...
});
});