Skip to content

editor: migrate from TinyMCE to HugeRTE MIT fork#337

Draft
mirekys wants to merge 5 commits into
inveniosoftware:masterfrom
oarepo:mirekys/tinymce-to-hugerte-migration
Draft

editor: migrate from TinyMCE to HugeRTE MIT fork#337
mirekys wants to merge 5 commits into
inveniosoftware:masterfrom
oarepo:mirekys/tinymce-to-hugerte-migration

Conversation

@mirekys
Copy link
Copy Markdown

@mirekys mirekys commented May 14, 2026

❤️ Thank you for your contribution!

Description

Replaces TinyMCE with HugeRTE, an MIT-licensed fork, to avoid the GPL/commercial licensing of TinyMCE 7+. Updates all imports, package dependencies, API should be compatible with TinyMCE v6 (should be a drop-in replacement).

Starting with TinyMCE 7, we'd otherwise have to decide whether to go with commercial or GPLv2+ license,
which I think is a no-go for this project, see:
https://www.tiny.cloud/docs/tinymce/latest/license-key/

Warning:

This PR requires webpack.py copypath updates in (otherwise the editor component renders as blank div):

  • invenio-app-rdm
  • invenio-rdm-records
  • invenio-communities
  • invenio-administration
  • invenio-requests
    Wee'll need to rename .../node_modules/tinymce/skins/content/... to .../node_modules/hugerte/skins/content/...

See for example: https://github.com/inveniosoftware/invenio-app-rdm/blob/master/invenio_app_rdm/theme/webpack.py#L80-L97

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Frontend

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.

mirekys added 3 commits May 14, 2026 12:57
* Replaces tinymce ^6.7.2 with hugerte ^1.0.10
* Replaces @tinymce/tinymce-react ^4.3.0 with @hugerte/hugerte-react ^2.0.2
* Replaces tinymce/* imports with hugerte/* equivalents
* Replaces @tinymce/tinymce-react with @hugerte/hugerte-react
* Removes unnecessary function wrapper around value prop
@mirekys mirekys changed the title Migrate from TinyMCE to HugeRTE MIT fork editor: migrate from TinyMCE to HugeRTE MIT fork May 14, 2026
mirekys added 2 commits May 18, 2026 12:58
* Adds explicit base_url to RichEditor config, so HugeRTE resolves
  skin CSS paths correctly, when bundled inside Webpack/Rspack
  chunks. Without base_url, HugeRTE's auto-detection fails, because
  hugerte script is inside a dynamic chunk, not a standalone <script>.
* Adds patch-hugerte-langs.js and copy-hugerte-langs.js build scripts
* Adds locale detection via MutationObserver on document.documentElement
* Loads locale packs on demand via explicit dynamic import() map
* Wires locale prop through RichInputField and RichInput widget
* Updates Editor key to include localeLoaded for remount timing
* Adds tinymce-i18n devDependency for HugeRTE language packs
@mirekys mirekys marked this pull request as draft May 25, 2026 10:37
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

Successfully merging this pull request may close these issues.

1 participant