PHPackages                             moonshine/tinymce - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. moonshine/tinymce

ActiveLibrary

moonshine/tinymce
=================

TinyMce editor for MoonShine

2.0.0(6mo ago)523.1k—4.3%4MITJavaScriptPHP ^8.2|^8.3

Since Oct 11Pushed 6mo ago2 watchersCompare

[ Source](https://github.com/moonshine-software/tinymce)[ Packagist](https://packagist.org/packages/moonshine/tinymce)[ Docs](https://moonshine-laravel.com)[ RSS](/packages/moonshine-tinymce/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (12)Used By (0)

TinyMce field for [MoonShine Laravel admin panel](https://moonshine-laravel.com)
================================================================================

[](#tinymce-field-for-moonshine-laravel-admin-panel)

Extends [Textarea](https://moonshine-laravel.com/docs/resource/fields/fields-textarea) and has the same features

   ![windows](https://raw.githubusercontent.com/moonshine-software/tinymce/main/art/tinymce.png)Important

Before using this field, you must register on the site at [Tiny.Cloud](https://www.tiny.cloud), get the token and add it to the `.env`

```
TINYMCE_TOKEN="YOUR_TOKEN"

```

---

Compatibility
-------------

[](#compatibility)

MoonShineMoonshine TinyMceCurrently supported&gt;= v3.0&gt;= v1.0.0yes&gt;= v4.0&gt;= v2.0.0yesInstallation
------------

[](#installation)

```
composer require moonshine/tinymce
```

Usage
-----

[](#usage)

```
use MoonShine\TinyMce\Fields\TinyMce;

TinyMce::make('Description')
```

Default config
--------------

[](#default-config)

`TinyMce` field uses the most common settings such as plugins, menubar and toolbar by default

To change the default settings, you need to publish the configuration file:

```
php artisan vendor:publish --tag="moonshine-tinymce-config"
```

You can also add additional options to the configuration file that will apply to all `TinyMce` fields

```
'options' => [
    'forced_root_block' => 'div',
    'force_br_newlines' => true,
    'force_p_newlines' => false,
],
```

Locale
------

[](#locale)

The default is your application's locale, but using the `locale()` method you can define a specific locale

```
locale(string $locale)
```

```
TinyMce::make('Description')
    ->locale('ru');
```

English (en), Russian (ru) and Ukrainian (uk) are currently available, but we are always ready to add the others.

To add new localizations, create an issue or make a pull request

Plugins
-------

[](#plugins)

The `plugins()` method allows you to completely override the plugins that the field will use

```
plugins(array $plugins)
```

```
TinyMce::make('Description')
    ->plugins(['code', 'image', 'link', 'media', 'table'])
```

The `addPlugins()` method allows you to add new plugins to the default plugins

```
addPlugins(array $plugins)
```

```
TinyMce::make('Description')
    ->addPlugins(['wordcount'])
```

The `removePlugins()` method allows you to exclude plugins that the field will use

```
removePlugins(array $plugins)
```

```
TinyMce::make('Description')
    ->removePlugins(['autoresize'])
```

Menubar
-------

[](#menubar)

The `menubar()` method allows you to completely override menubar for a field

```
menubar(string|bool $menubar)
```

```
TinyMce::make('Description')
    ->menubar('file edit view')
```

Toolbar
-------

[](#toolbar)

The `toolbar()` method allows you to completely override toolbar for a field

```
toolbar(string|bool|array $toolbar)
```

```
TinyMce::make('Description')
    ->toolbar('file edit view')
```

Options
-------

[](#options)

The `addOption()` method allows you to add additional options for a field

```
addOption(string $name, string|int|float|bool|array $value)
```

```
TinyMce::make('Description')
    ->addOption('forced_root_block', 'div')
```

The `addCallback()` method allows you to add callback options for a field

```
addCallback(string $name, string $value)
```

```
TinyMce::make('Description')
    ->addCallback('setup', '(editor) => console.log(editor)')
```

Note

You can use string, number, boolean and array as values.

File manager
------------

[](#file-manager)

If you want to use the file manager in TinyMce, you need to install the package [Laravel FileManager](https://github.com/UniSharp/laravel-filemanager)

### Installation

[](#installation-1)

```
composer require unisharp/laravel-filemanager

php artisan vendor:publish --tag=lfm_config
php artisan vendor:publish --tag=lfm_public
```

Note

Be sure to set the 'use\_package\_routes' flag in the lfm config to false, otherwise caching routes will cause an error.

```
// config/lfm.php

'use_package_routes' => false,
```

### Routes file

[](#routes-file)

Create a routes file like `routes/moonshine.php` and register the LaravelFilemanager routes.

```
use Illuminate\Support\Facades\Route;
use UniSharp\LaravelFilemanager\Lfm;

Route::prefix('laravel-filemanager')->group(function () {
    Lfm::routes();
});
```

### File registration

[](#file-registration)

Register the generated routes file in `app/Providers/RouteServiceProvider.php`

Warning

The route file must be in the middleware `moonshine` group!

```
public function boot()
{
    // ...

    $this->routes(function () {
        // ...

        Route::middleware('moonshine')
            ->namespace($this->namespace)
            ->group(base_path('routes/moonshine.php'));
    });
}
```

Important

In order to allow access only to users authorized in the admin panel you need to add middleware `MoonShine\Laravel\Http\Middleware\Authenticate.`

```
use MoonShine\Laravel\Http\Middleware\Authenticate;

// ...

public function boot()
{
    // ...

    $this->routes(function () {
        // ...

        Route::middleware(['moonshine', Authenticate::class])
            ->namespace($this->namespace)
            ->group(base_path('routes/moonshine.php'));
    });
}
```

### Configuration

[](#configuration)

You need to add an option for the field

```
TinyMce::make('Description')
    ->addOption('file_manager', 'laravel-filemanager')
```

or add in the `config/moonshine_tinymce.php` configuration file to apply to all `TinyMCe` fields

```
'options' => [
    'file_manager' => 'laravel-filemanager',
],
```

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance68

Regular maintenance activity

Popularity35

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 77.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~36 days

Recently: every ~54 days

Total

12

Last Release

189d ago

Major Versions

1.x-dev → 2.0.02025-11-11

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1861327?v=4)[Danil Shutsky](/maintainers/lee-to)[@lee-to](https://github.com/lee-to)

---

Top Contributors

[![DissNik](https://avatars.githubusercontent.com/u/12373059?v=4)](https://github.com/DissNik "DissNik (31 commits)")[![lee-to](https://avatars.githubusercontent.com/u/1861327?v=4)](https://github.com/lee-to "lee-to (7 commits)")[![MrVACO](https://avatars.githubusercontent.com/u/10116170?v=4)](https://github.com/MrVACO "MrVACO (2 commits)")

---

Tags

tinymcemoonshine

###  Code Quality

TestsPHPUnit

Static AnalysisRector

### Embed Badge

![Health badge](/badges/moonshine-tinymce/health.svg)

```
[![Health](https://phpackages.com/badges/moonshine-tinymce/health.svg)](https://phpackages.com/packages/moonshine-tinymce)
```

###  Alternatives

[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.3M74](/packages/unisharp-laravel-filemanager)[barryvdh/laravel-elfinder

A Laravel Package to integrate elFinder 2

7542.7M45](/packages/barryvdh-laravel-elfinder)[tinymce/tinymce

Web based JavaScript HTML WYSIWYG editor control.

1697.5M106](/packages/tinymce-tinymce)[stfalcon/tinymce-bundle

This Bundle integrates TinyMCE WYSIWYG editor into a Symfony2 project.

2692.9M24](/packages/stfalcon-tinymce-bundle)[laravel-lang/common

Easily connect the necessary language packs to the application

1463.1M22](/packages/laravel-lang-common)[amidesfahani/filament-tinyeditor

Filament TinyMce Editor

99328.8k4](/packages/amidesfahani-filament-tinyeditor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
