New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

emilianotisato/nova-tinymce

This Nova package allow you to use TinyMCE editor for text areas.You can customize the editor options and... you can upload images to your server and put them rigth there on the text without leaving the text editor!
1,072,476 116

Larablocks Analysis

emilianotisato/nova-tinymce works with any PHP project: the latest release (2.0.1, Jun 29, 2023) doesn't depend on Laravel.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • No release in the last 12 months (last: Jun 29, 2023)
  • 31,543 downloads a month (at least 10,000)
  • 116 GitHub stars (at least 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Jun 29, 2023.
  • No releases in the last 12 months.
  • First released: Oct 2, 2018.
  • Monthly downloads: 31,543, up 88% from six months ago.
  • 16 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 1, 2026.

Install
composer require emilianotisato/nova-tinymce
Latest Version:2.0.1
PHP:^7.3|^8.0
License:MIT
Last Updated:Apr 19, 2024
Links: GitHub  ·  Packagist
Maintainer: emilianotisato

Laravel Nova TinyMCE editor (with images upload capabilities!)

This Nova package allow you to use TinyMCE editor for text areas. You can customize the editor options and... you can upload images to your server and put them right there on the content without leaving the text editor!! Editor

Installation

(backward compatibility)

Nova Package
V 1, 2, 3 V 1
V 4 V 2
composer require emilianotisato/nova-tinymce

Run the command bellow, to publish TinyMCE JavaScript and CSS assets.

php artisan vendor:publish --provider="Emilianotisato\NovaTinyMCE\FieldServiceProvider"

Usage

In your Nova resource add the use declaration and use the NovaTinyMCE field:

use Emilianotisato\NovaTinyMCE\NovaTinyMCE;

// ...

    /**
     * Get the fields displayed by the resource.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function fields(Request $request)
    {
        return [
            ID::make()->sortable(),

            NovaTinyMCE::make('body'),
        ];
    }

By default, the editor comes with some basic options and the image management without the filemanager (inserted just as links).

You can use custome options like this:

NovaTinyMCE::make('body')->options([
                'plugins' => [
                    'lists','preview','anchor','pagebreak','image','wordcount','fullscreen','directionality'
                ],
                'toolbar' => 'undo redo | styles | bold italic forecolor backcolor | alignleft aligncenter alignright alignjustify | image | bullist numlist outdent indent | link'
            ]),

Using the upload images feature with LFM

Now if you need to upload images from the text editor, we need to install UniSharp Laravel Filemanager, and pass the use_lfm => true option to your options array:

NovaTinyMCE::make('body')->options([
                'plugins' => [
                    'lists','preview','anchor','pagebreak','image','wordcount','fullscreen','directionality'
                ],
                'toolbar' => 'undo redo | styles | bold italic forecolor backcolor | alignleft aligncenter alignright alignjustify | image | bullist numlist outdent indent | link',
                'use_lfm' => true
            ]),
ONLY if you use laravel-filemanager v1

If you use LFM v1 , the last step is to run this command to fix some Filemanager files:

php artisan nova-tinymce:support-lfm

Finally you will need to update the lfm_url key to match the old url version like this lfm_url' => 'laravel-filemanager.

IMPORTANT: if you are in laravel 6 using laravel-filemanager v1, you will need to import the helper lib coz legacy Filemanager need them: composer require laravel/helpers.

Optional Configuration

Laravel Filemanager URL

Optional, in case you change the laravel-filemanager URL in the package config file (config/lmf.php), you need to pass that info to this nova field with the lfm_url key in the options array.

// ...
    'use_lfm' => true,
    'lfm_url' => 'my-custom-filemanager-url'
// ...

Override config file

In case you have in mind a default options array to load any time you instantiate the NovaTinyMCE field, you can optionally publish the config file and override the default_options array:

php artisan vendor:publish --provider="Emilianotisato\NovaTinyMCE\FieldServiceProvider" --tag="config"

This is the contents of the published config file:

<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Default Options
    |--------------------------------------------------------------------------
    |
    | Here you can define the options that are passed to all NovaTinyMCE
    | fields by default.
    |
    */

    'default_options' => [
        'content_css' => '/vendor/tinymce/skins/ui/oxide/content.min.css',
        'skin_url' => '/vendor/tinymce/skins/ui/oxide',
        'path_absolute' => '/',
        'plugins' => [
            'lists','preview','anchor','pagebreak','image','wordcount','fullscreen','directionality'
        ],
        'toolbar' => 'undo redo | styles | bold italic forecolor backcolor | alignleft aligncenter alignright alignjustify | image | bullist numlist outdent indent | link',
        'relative_urls' => false,
        'use_lfm' => false,
        'lfm_url' => 'filemanager'
    ],
];

Plugin customization

You can virtually pass any configuration option for the javascript SDK to the array in the options() method.

For example, you like to have increased the height of the text area:

            NovaTinyMCE::make('body')->options([
                'height' => '980'
                ]),

You can see the full list of parameters in the docs: https://www.tiny.cloud/docs/configure/

Using JSON syntax on attribute property

If you use JSON syntax on attribute name, TinyMCE won't initialize because the default id will be an invalid HTML id attribute. To solve this you can define a custom id. For example:

    NovaTinyMCE::make('Value', 'text->en')->id('custom-id');

Related Packages

advoor/nova-editor-js

A Laravel Nova field bringing EditorJs magic to Nova.

375,491 92
epartment/nova-dependency-container

A Laravel Nova field container allowing to depend on other fields values

4,726,332 378
eminiarts/nova-tabs

Laravel Nova - Tabs.

4,678,431 464
ebess/advanced-nova-media-library

Laravel Nova tools for managing the Spatie media library.

4,010,317 616
spatie/nova-tags-field

A tags field for Nova apps

2,430,796 301

Version History

Version Released PHP License
2.0.1 ^7.3|^8.0 MIT
2.0.0 ^7.3|^8.0 MIT
1.2.1 >=7.1.0 MIT
1.2.0 >=7.1.0 MIT
1.1.5 >=7.1.0 MIT