##TinyMCE editor for Laravel and Lumen Framework Powerful WYSIWYG editor with easy installation and already configured to use quickly and simply.
Just add the line in his view, well above the <textarea id="tinymce">
:
@include('tinymce::tpl')
If you want to be available globally, just add the tag <head>
composer require ktquez/laravel-tinymce
Add in config/app.php
:
'Ktquez\Tinymce\TinymceServiceProvider'
Finally, publish the files:
php artisan vendor:publish --force
Add in bootstrap/app.php
:
$app->configure('tinymce');
$app->register('Ktquez\Tinymce\TinymceServiceProvider');
As in Lumen can not run the vendor:publish
, you must copy the config/tinymce.php
to the base path of your project in the config/
And copy the tinymce/
folder that is within assets/js/
to your folder public/
with the path you want.
In config/tinymce.php
have the settings of your editor:
Set the path of tinymce.min.js
file:
'cdn' => config('app.url').'/vendor/js/tinymce/tinymce.min.js',
Set customization parameters of TinyMCE:
Set the id
of the textarea
'params' => [
"selector" => "#tinymce",
...
Sets the language editor, available in the package de, es, pt_BR and fr_FR
"language" => 'pt_BR',
Skin editor, available in the package lightgray, charcoal and tundora
"skin" => "lightgray",
Add plugins and toolbar, by default:
"plugins" => [
"advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
"save table contextmenu directionality emoticons template paste textcolor"
],
"toolbar" => "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l ink image | print preview media fullpage | forecolor backcolor emoticons",
To learn more, just access the TinyMCE documentation
TinyMCE : Current Version 4.2.1