PHPackages                             engars/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. engars/tinymce

ActiveLibrary

engars/tinymce
==============

TinyMCE WYSIWYG editor integration for laravel-admin

00JavaScript

Since Jul 31Pushed todayCompare

[ Source](https://github.com/EngarS/laravel-admin-tinymce)[ Packagist](https://packagist.org/packages/engars/tinymce)[ RSS](/packages/engars-tinymce/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

TinyMCE extension for laravel-admin
===================================

[](#tinymce-extension-for-laravel-admin)

This is a `laravel-admin` extension that integrates the [TinyMCE](https://github.com/tinymce/tinymce) WYSIWYG editor into the `laravel-admin` form.

Requirements
------------

[](#requirements)

- php: &gt;=7.0.0
- encore/laravel-admin: ~1.8

Installation
------------

[](#installation)

```
composer require engars/tinymce

php artisan vendor:publish --tag=laravel-admin-ext-tinymce
```

Configuration
-------------

[](#configuration)

To publish the configuration file, run the following command:

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

This will create a `config/tinymce.php` file. In this file, you can customize the editor's options. For more information on the available options, please refer to the [TinyMCE Documentation](https://www.tiny.cloud/docs/tinymce/7/).

Example configuration:

```
return [
    'editor' => [
        'plugins' => 'code table lists advlist link anchor media image quickbars help toc',
        'toolbar' => 'undo redo | blocks | bold italic | alignleft aligncenter alignright | indent outdent | bullist numlist | code | table | image | toc',
        'contextmenu' => 'link image table',
        'image_advtab' => true,
        'hidden_input' => false,
        'license_key' => 'gpl',
    ],

    'expressions' => [
        'images_upload_handler',
        'file_picker_callback',
        'setup',
    ],
];
```

Usage
-----

[](#usage)

Use it in the form:

```
$form->tinymce('content');
```

You can also override the default configuration for a specific editor instance:

```
$form->tinymce('content')
    ->config([
        'menubar' => 'edit view insert tools',
        'plugins' => 'code',
        'toolbar' => 'undo redo | code',
    ]);
```

Localization
------------

[](#localization)

To change the editor's language, you can use the `language` and `language_url` options. TinyMCE 7 does not bundle language packs by default.

1. **Download a language pack** from the [official TinyMCE website](https://www.tiny.cloud/get-tiny/language-packages/).
2. **Place it** in your project's public directory, for example, in `public/vendor/tinymce/langs/`.
3. **Specify the path** in the `config/tinymce.php` configuration file:

```
// config/tinymce.php
return [
    'editor' => [
        'language' => 'ru', // The language code, e.g., 'ru' for Russian
        'language_url' => asset('vendor/tinymce/langs/ru.js'), // Path to the language file
        // ...
    ],
    // ...
];
```

For the latest information on localization, please refer to the [official TinyMCE documentation](https://www.tiny.cloud/docs/tinymce/7/ui-localization/).

Image Uploading
---------------

[](#image-uploading)

Configuring image uploads is a common requirement. The process involves a backend route to handle the file and a JavaScript function to manage the upload process on the client side.

1. **Create a backend route** to handle the image upload. This route will receive the image and should return a JSON response with the location of the stored file.

    ```
    // e.g., in routes/admin.php
    Route::post('tinymce/upload', [App\Http\Controllers\Admin\TinyMceController::class, 'upload']);
    ```
2. **Create the controller** (`TinyMceController` in this example) to implement the upload logic. It should store the file and return a JSON response like `{"location": "path/to/your/image.jpg"}`.
3. **Create a JavaScript handler** for the upload. Create a new JavaScript file (e.g., `public/js/tinymce/tinymce-image-handler.js`) and place your upload handler logic inside it. The handler function must be globally accessible. A full example of the handler can be found in the [TinyMCE documentation](https://www.tiny.cloud/docs/tinymce/7/images-and-file-types/#images_upload_handler).
4. **Include the JavaScript file** in the admin controller where you use the TinyMCE editor.

    ```
    // In your Admin Controller (e.g., PostController.php)

    class PostController extends AdminController
    {
        public function form()
        {
            // Include the custom JS handler
            Admin::js('js/tinymce/tinymce-image-handler.js');

            $form = new Form(new Post());

            $form->tinymce('content');

            return $form;
        }
    }
    ```
5. **Configure the handler** in `config/tinymce.php`. Make sure the function name matches the one in your JavaScript file and is listed in the `expressions` array.

    ```
    // config/tinymce.php
    return [
        'editor' => [
            // ...
            'images_upload_handler' => 'tinymce_upload_handler', // The name of your JS function
        ],
        'expressions' => [
            'images_upload_handler', // Important: list the function name here
        ],
    ];
    ```

License
-------

[](#license)

This project is licensed under the [MIT License](LICENSE).

###  Health Score

20

—

LowBetter than 12% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e1830e813a5a6a421e1aa62b27bfc08f4847bf51a2c9911944ace5022f7e0b14?d=identicon)[EngarS](/maintainers/EngarS)

---

Top Contributors

[![EngarS](https://avatars.githubusercontent.com/u/23636551?v=4)](https://github.com/EngarS "EngarS (1 commits)")

### Embed Badge

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

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

PHPackages © 2026

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