Skip to content

gildniy/laravel-tinymce

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

##TinyMCE editor for Laravel and Lumen Framework Powerful WYSIWYG editor with easy installation and already configured to use quickly and simply.

Latest Stable Version Total Downloads Latest Unstable Version License

How to use

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>

Instalation

composer require ktquez/laravel-tinymce

Laravel

Add in config/app.php:

'Ktquez\Tinymce\TinymceServiceProvider' 

Finally, publish the files:

php artisan vendor:publish --force

Lumen

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.

Configuration

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

About

TinyMCE editor for Laravel and Lumen Framework

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 81.8%
  • CSS 13.7%
  • PHP 3.9%
  • HTML 0.6%