stfalcon / TinymceBundle

Bundle for connecting TinyMCE (WYSIWYG editor) to your Symfony2 project
259 stars 154 forks source link

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

Open MicWit opened 6 years ago

MicWit commented 6 years ago

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 commented 6 years ago

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

stollr commented 3 years ago

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
  2. 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]'
    })
    // ...
  3. 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;

4. The last thing is to include the initialization file into your `app.js`
```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.