PHP code example of kraftbit / nova-tinymce5-editor

1. Go to this page and download the library: Download kraftbit/nova-tinymce5-editor 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/ */

    

kraftbit / nova-tinymce5-editor example snippets


use Kraftbit\NovaTinymce5Editor\NovaTinymce5Editor;

...

NovaTinymce5Editor::make('Body', 'body'),

NovaTinymce5Editor::make('Body')->placeholder('Enter content here')
->options(['toolbar' => ['undo redo | align | link | code'], 'plugins' => ['link code']]),

NovaTinymce5Editor::make('Body')->id('body')->withMeta(['mediaLibrary' => true]),

MediaLibrary::make('Insert image', 'js_callback_media_library')
->jsCallback('mediaLibrarySelectFiles', ['editor' => 'body'])->types(['Image']),
bash
php artisan vendor:publish --provider="Kraftbit\NovaTinymce5Editor\FieldServiceProvider"