1. Go to this page and download the library: Download dive-be/nova-froala-field library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dive-be / nova-froala-field example snippets
namespace App\Nova;
use Froala\Nova\Froala;
final class Article extends Resource
{
// ...
public function fields(NovaRequest $request): array
{
return [
// ...
Froala::make('Content'),
// ...
];
}
}
/*
|--------------------------------------------------------------------------
| Default Editor Options
|--------------------------------------------------------------------------
|
| Setup default values for any Froala editor option.
|
| To view a list of all available options check out the Froala documentation
| {@link https://www.froala.com/wysiwyg-editor/docs/options}
|
*/
'options' => [
'toolbarButtons' => [
[
'bold',
'italic',
'underline',
],
[
'formatOL',
'formatUL',
],
[
'insertImage',
'insertFile',
'insertLink',
'insertVideo',
],
[
'html',
],
],
],
//...
/*
|--------------------------------------------------------------------------
| Maximum Possible Size for Uploaded Files
|--------------------------------------------------------------------------
|
| Customize max upload filesize for uploaded attachments.
| By default it is set to "null", it means that default value is
| retrieved from `upload_max_size` directive of php.ini file.
|
| Format is the same as for `uploaded_max_size` directive.
| Check out FAQ page, to get more detail description.
| {@link http://php.net/manual/en/faq.using.php#faq.using.shorthandbytes}
|
*/
'upload_max_filesize' => null,
//...
use Froala/Nova/Froala;
Froala::make('Content')->showOnIndex();