Is this project dead? Update to new mce version?
Opened this issue ยท 2 comments
MicWit commented
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?
stollr commented
I'd suggest to migrate away from this bundle and directly use Tinymce with Symfony Encore.
Here's a small how to:
- Add tinymce to your
package.json
yarn add tinymce
- 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]'
})
// ...
- 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;
- 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.