Monday, May 10, 2021

Sitecore TinyMCE: New Life

It is a copy of my article initially posted here to keep all things in one place.

Sitecore uses Telerik Rich Text Editor for a long time. It is quite a powerful and reliable editor. But sometimes it is really hard to extend it if you want to do something complex. And also, there are a lot of free open-source alternatives that could be better. And it is not a new idea, people from time to time ask, how to replace Sitecore RTE with something else.

One of the options is TinyMCE. This advanced rich text editor has different pricing plans. But even the free plan has too many features. It can cover 95% of editing cases.

And the idea to integrate Sitecore with TinyMCE also is not new. After a quick search, we are able to find:

Both modules are open-source and have Github repositories(1, 2). We are more interested in the extension of Content Editor that is why I took the Emanuele module as a basis. Then I started to work on improvements:

  1. There was added Unicorn serialization. It allows developers to work easier with Sitecore content items that are required for this module.
  2. The way, how TinyMCE is included in the project was changed. Instead of adding static frontend files, now Tiny MCE is installed as npm module.
  3. Version of TinyMCE was updated to 5.6.1
  4. Continuous integration and continuous delivery were configured using AppVeyor. Now, each commit to GitHub triggers AppVeyor build and provides Sitecore .update package as an artifact. This package could be installed on any Sitecore CM instance. If you are interested in how it was done, I described it in detail in my blog for another Sitecore module.
  5. SonarCloud was configured to ensure code quality. And, yeah, there are still many things that could be improved in code. Contributions are welcome!
  6. Added one more Sitecore field type. Now you should not choose between classic Sitecore RTE and TinyMCE. Now you have both at once. Rich Text editor has buttons to open Sitecore RTE as well as TinyMCE RTE.
  7. Added Sitecore 10 support.
  8. Changed the way how references are used. Locally copied assemblies were replaced with Nuget packages.
  9. Added style formats support.
  10. Improved local development experience: added publishing profiles and proper development setup description.
  11. Many other small improvements.

I hope all these changes will bring this module to a new life. But there is still room for other improvements. Contributions to the Github repository are welcomed. If you find any bugs - report them. If you fixed bugs or added new functionality - create pull requests.