Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this project dead? Update to new mce version? #221

Open
MicWit opened this issue Sep 21, 2017 · 2 comments
Open

Is this project dead? Update to new mce version? #221

MicWit opened this issue Sep 21, 2017 · 2 comments

Comments

@MicWit
Copy link

MicWit commented Sep 21, 2017

I notice it has been a year without changes. Has this project died? There has been some major fixes in late versions of TinyMCE, would be great to have an upgrade. Is there a project forked that will maintain active updates?

@metalmini
Copy link

https://github.com/gibilogic/tinymce-bundle

@stollr
Copy link

stollr commented Nov 9, 2020

I'd suggest to migrate away from this bundle and directly use Tinymce with Symfony Encore.

Here's a small how to:

  1. Add tinymce to your package.json
yarn add tinymce
  1. Extend your webpack.config.js to make it copy the skin files to the public asset directory
Encore
    // directory where compiled assets will be stored
    .setOutputPath('public/build/')
    // public path used by the web server to access the output path
    .setPublicPath('/build')
    // copy tinymce skin files to asset directoy
    .copyFiles({
        from: 'node_modules/tinymce',
        to: 'tinymce/[path]/[name].[ext]'
    })
    // ...
  1. Create your configuration and initialization file for tinymce:
// /assets/js/global/tinymce.js
import tinymce from 'tinymce';

document.addEventListener('DOMContentLoaded', function() {
    tinymce.init({
        selector: 'textarea.tinymce',
        base_url: '/build/tinymce',
    });
});

export default tinymce;
  1. The last thing is to include the initialization file into your app.js
// /assets/js/app.js
import './global/tinymce.js';
// ...

If you do not want to include the tinymce initialization on any pages, you can import the global/tinymce.js instead only in the page specific Encore entries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants