PHPackages                             eckinox/tinymce-bundle - 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. [Templating &amp; Views](/categories/templating)
4. /
5. eckinox/tinymce-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

eckinox/tinymce-bundle
======================

A Symfony bundle to add TinyMCE in your apps and forms.

v2.0.0(2y ago)28113.5k—8.6%4[6 issues](https://github.com/eckinox/tinymce-bundle/issues)[1 PRs](https://github.com/eckinox/tinymce-bundle/pulls)1JavaScriptPHP ^8.0

Since May 10Pushed 2y ago5 watchersCompare

[ Source](https://github.com/eckinox/tinymce-bundle)[ Packagist](https://packagist.org/packages/eckinox/tinymce-bundle)[ RSS](/packages/eckinox-tinymce-bundle/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (8)Versions (12)Used By (1)

TinyMCE for your Symfony apps and forms
=======================================

[](#tinymce-for-your-symfony-apps-and-forms)

Getting started
---------------

[](#getting-started)

### 1. Install this package via Composer

[](#1-install-this-package-via-composer)

```
composer require eckinox/tinymce-bundle
```

### 2. Start using TinyMCE!

[](#2-start-using-tinymce)

#### Using TinyMCE in Symfony forms

[](#using-tinymce-in-symfony-forms)

Adding a TinyMCE editor in your Symfony forms works like any other form types:

```
public function buildForm(FormBuilderInterface $builder, array $options): void
{
    $builder->add("comment", TinymceType::class, [
        "attr" => [
            "toolbar" => "bold italic underline | bullist numlist",
        ],
    ])
    // ...
```

#### Using TinyMCE in templates

[](#using-tinymce-in-templates)

To render a TinyMCE editor in Twig without using Symfony forms, you can use the `tinymce()` Twig function that is provided by this bundle.

Simply provide the value as the first argument and you're good to go.

You can also use the second argument to specify attributes to add to the element.

Here is an example:

```
{{ tinymce("This is a note", { name: "notes", skin: "oxide" }) }}
```

#### Using TinyMCE in Javascript

[](#using-tinymce-in-javascript)

To render a TinyMCE editor in Javascript, first ensure that the main TinyMCE script is loaded.

If you already use the `tinymce()` Twig function or the `TinymceType` on the page, the scripts are already loaded. Otherwise, you can include them on the page either by adding the following scripts manually:

```

```

or by using the `tinymce_scripts()` function like so:

```
{{ tinymce_scripts() }}
```

Then, all you have to do is add a TinyMCE editor web element on the page with the desired attributes and value.

Here's is an example:

```
const contentText = document.createTextNode("Your original text goes here");
const editor = document.createElement("tinymce-editor");

editor.append(contentText);
editor.setAttribute("skin", "appstack");

// Add the editor to the page
document.body.append(editor);
```

You can refer to [Tiny's web component documentation](https://www.tiny.cloud/docs/tinymce/6/webcomponent-ref)for more information.

Configuring TinyMCE
-------------------

[](#configuring-tinymce)

This bundle includes and uses the web component version of TinyMCE.

You can configure TinyMCE by setting HTML attributes on the editor element itself (``).

When using the form type, you can use the `attr` option to set the attributes.
For example, you can set the toolbar's actions like so:

```
public function buildForm(FormBuilderInterface $builder, array $options): void
{
    $builder->add("comment", TinymceType::class, [
        "attr" => [
            "toolbar" => "bold italic underline | bullist numlist",
        ],
    ])
    // ...
```

For more information on the different configurations that TinyMCE offers, refer to [Tiny's web component documentation](https://www.tiny.cloud/docs/tinymce/6/webcomponent-ref/).

### Default configurations

[](#default-configurations)

You can set the following default options in a configuration file:

```
tinymce:
    # The configurations mirror the TinyMCE attributes.
    # Learn more about each option in Tiny's documentation:
    # https://www.tiny.cloud/docs/tinymce/6/webcomponent-ref/
    skin: "oxide"
    content_css: "default"
    plugins: "advlist autolink link image media table lists"
    toolbar: "bold italic underline | bullist numlist"
    images_upload_url: "https://yoursite.com/upload"
    images_upload_route: "" # Name of the route for `images_upload_url` (leave `images_upload_url` blank if using this)
    images_upload_route_params: "" # Parameters of the route for `images_upload_url` (leave `images_upload_url` blank if using this)
    images_upload_handler: ""
    images_upload_base_path: ""
    images_upload_credentials: "true"
    images_reuse_filename: ""
```

### File uploads (optional)

[](#file-uploads-optional)

File uploads are not handled by default, as the process will vary from project to project.

To set this up, take a look at [Tiny's web component file upload documentation](https://www.tiny.cloud/docs/tinymce/6/webcomponent-ref/#setting-the-images-upload-url).

To help you get started, we have provided an example of what the implementation may look like. You can find this example in [`docs/file-upload-example.md`](./docs/file-upload-example.md).

AppStack skin
-------------

[](#appstack-skin)

This bundle comes with an `appstack` skin, which matches the style of the [AppStack Bootstrap template](https://appstack-bs5.bootlab.io/index.html).

This skin is an extension of the tinymce-5, and it has dark mode support built-in.

To use it, simply specify it in your configuration:

```
# config/packages/tinymce.yaml
tinymce:
    skin: appstack
    content_css: appstack
```

Versions
--------

[](#versions)

Bundle versionTinyMCE versionTinyMCE Web Component version**1.1**6.8.22.0.2**1.0**6.0.22.0.0Contributing
------------

[](#contributing)

Feel free to submit issues and PRs to the [eckinox/tinymce-bundle](https://github.com/eckinox/tinymce-bundle) repository on GitHub.

For more information on how to contribute, check out [CONTRIBUTING.md](./CONTRIBUTING.md).

License
-------

[](#license)

This bundle is distributed under the MIT license.

[TinyMCE](https://github.com/tinymce/tinymce) and the [TinyMCE web component](https://github.com/tinymce/tinymce-webcomponent) are developed and distributed by [Tiny®](https://www.tiny.cloud/) under the MIT license.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 87.9% 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 ~71 days

Recently: every ~32 days

Total

11

Last Release

798d ago

Major Versions

v0.1.5 → v1.0.02023-12-19

v1.1.1 → v2.0.02024-04-25

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19860246?v=4)[Eckinox](/maintainers/eckinox)[@eckinox](https://github.com/eckinox)

---

Top Contributors

[![EmilePerron](https://avatars.githubusercontent.com/u/9383532?v=4)](https://github.com/EmilePerron "EmilePerron (29 commits)")[![Emma1987](https://avatars.githubusercontent.com/u/28593632?v=4)](https://github.com/Emma1987 "Emma1987 (4 commits)")

---

Tags

symfony-bundletinymcetinymce-web-component

### Embed Badge

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

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M737](/packages/sylius-sylius)[chameleon-system/chameleon-base

The Chameleon System core.

1028.6k5](/packages/chameleon-system-chameleon-base)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k17.8k](/packages/prestashop-prestashop)[shopware/storefront

Storefront for Shopware

684.6M236](/packages/shopware-storefront)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)

PHPackages © 2026

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