[PR #3247] [MERGED] TinyMCE upgrade work #6164

Closed
opened 2026-02-05 10:25:56 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/3247
Author: @ssddanbrown
Created: 2/5/2022
Status: Merged
Merged: 2/8/2022
Merged by: @ssddanbrown

Base: developmentHead: tinymce


📝 Commits (10+)

  • db4093d Got TinyMCE 5 added in barely working state
  • 0cde270 Made further tweaks to align with current editor
  • 921131f Modularised our tinymce config and plugins
  • ef211a7 Made WYSIWYG editor translatable
  • c8b6f62 Added help/about box to wysiwyg editor
  • 84c501b Simplified wysiwyg toolbar with a overflow groups
  • e88dbe4 Added license references to readme attribution
  • 15647a0 Merged color and formats wysiwyg groups
  • e0d9380 Aligned some editor events, Changed wysiwyg custom styles loading
  • 572d8b3 Removed unused scroll patch after testing

📊 Changes

162 files changed (+5016 additions, -6599 deletions)

View changed files

📝 app/Http/Controllers/HomeController.php (+0 -8)
📝 package.json (+2 -2)
public/libs/tinymce/icons/default/icons.min.js (+1 -0)
📝 public/libs/tinymce/langs/README.md (+0 -0)
📝 public/libs/tinymce/plugins/advlist/plugin.min.js (+9 -1)
📝 public/libs/tinymce/plugins/anchor/plugin.min.js (+9 -1)
📝 public/libs/tinymce/plugins/autolink/plugin.min.js (+9 -1)
📝 public/libs/tinymce/plugins/autoresize/plugin.min.js (+9 -1)
📝 public/libs/tinymce/plugins/autosave/plugin.min.js (+9 -1)
📝 public/libs/tinymce/plugins/bbcode/plugin.min.js (+9 -1)
📝 public/libs/tinymce/plugins/charmap/plugin.min.js (+9 -1)
📝 public/libs/tinymce/plugins/code/plugin.min.js (+9 -1)
public/libs/tinymce/plugins/codesample/css/prism.css (+0 -138)
📝 public/libs/tinymce/plugins/codesample/plugin.min.js (+9 -1)
📝 public/libs/tinymce/plugins/colorpicker/plugin.min.js (+9 -1)
📝 public/libs/tinymce/plugins/contextmenu/plugin.min.js (+9 -1)
📝 public/libs/tinymce/plugins/directionality/plugin.min.js (+9 -1)
public/libs/tinymce/plugins/emoticons/img/smiley-cool.gif (+0 -0)
public/libs/tinymce/plugins/emoticons/img/smiley-cry.gif (+0 -0)
public/libs/tinymce/plugins/emoticons/img/smiley-embarassed.gif (+0 -0)

...and 80 more files

📄 Description

Work in progress. Upgrading TinyMCE 4 to 5. Cleanup of codebase while at it. Plan is to get functional/usable compatibility against existing TinyMCE 4 instance.

As planned in https://github.com/BookStackApp/BookStack/issues/2738#issuecomment-1022683101.

Elements to review

  • Dark mode
  • Responsive toolbar
  • Codemirror blocks throwing cursor position on focus
  • Ensure text/bg color "no-color" option is clickable.
  • RTL/LTR controls
  • Licenses
  • Custom hooks
  • Extract code/codemirror to seperate async bundle.
  • Review TODOs

Translation Notes

Add custom language like so:

    window.tinymce.addI18n('beans', {
        "Redo": "Bean forward",
        "Undo": "Bean back",
        "Callouts": "Beanouts",
    });

It's simply a [en => translation] mapping. Everything otherwise handled automatically.
Enable in config via language option:

{
    language: 'beans',
}

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/3247 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 2/5/2022 **Status:** ✅ Merged **Merged:** 2/8/2022 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `tinymce` --- ### 📝 Commits (10+) - [`db4093d`](https://github.com/BookStackApp/BookStack/commit/db4093d523352a29cabddd79ad40262f6fa1b5c6) Got TinyMCE 5 added in barely working state - [`0cde270`](https://github.com/BookStackApp/BookStack/commit/0cde2704d09ecb03936683ea0446be0650e6918d) Made further tweaks to align with current editor - [`921131f`](https://github.com/BookStackApp/BookStack/commit/921131f99949960f448b2cfbb0ad78edc8d4f24a) Modularised our tinymce config and plugins - [`ef211a7`](https://github.com/BookStackApp/BookStack/commit/ef211a76aede33136416d50b6c636de7bff3fbed) Made WYSIWYG editor translatable - [`c8b6f62`](https://github.com/BookStackApp/BookStack/commit/c8b6f622f43874ceeef0fda0ddbbef724f8a1694) Added help/about box to wysiwyg editor - [`84c501b`](https://github.com/BookStackApp/BookStack/commit/84c501bcf4bdd4c672c1d2d41f538b19dd5a1859) Simplified wysiwyg toolbar with a overflow groups - [`e88dbe4`](https://github.com/BookStackApp/BookStack/commit/e88dbe4db3c9e6bfb511283a329a3b9c7ae67e95) Added license references to readme attribution - [`15647a0`](https://github.com/BookStackApp/BookStack/commit/15647a040999e8f41265937dc16c1a810b7de631) Merged color and formats wysiwyg groups - [`e0d9380`](https://github.com/BookStackApp/BookStack/commit/e0d938005591c14e1b9ad593b772ea427b8f281d) Aligned some editor events, Changed wysiwyg custom styles loading - [`572d8b3`](https://github.com/BookStackApp/BookStack/commit/572d8b37007d61e5d5760544d5293b12f393c639) Removed unused scroll patch after testing ### 📊 Changes **162 files changed** (+5016 additions, -6599 deletions) <details> <summary>View changed files</summary> 📝 `app/Http/Controllers/HomeController.php` (+0 -8) 📝 `package.json` (+2 -2) ➕ `public/libs/tinymce/icons/default/icons.min.js` (+1 -0) 📝 `public/libs/tinymce/langs/README.md` (+0 -0) 📝 `public/libs/tinymce/plugins/advlist/plugin.min.js` (+9 -1) 📝 `public/libs/tinymce/plugins/anchor/plugin.min.js` (+9 -1) 📝 `public/libs/tinymce/plugins/autolink/plugin.min.js` (+9 -1) 📝 `public/libs/tinymce/plugins/autoresize/plugin.min.js` (+9 -1) 📝 `public/libs/tinymce/plugins/autosave/plugin.min.js` (+9 -1) 📝 `public/libs/tinymce/plugins/bbcode/plugin.min.js` (+9 -1) 📝 `public/libs/tinymce/plugins/charmap/plugin.min.js` (+9 -1) 📝 `public/libs/tinymce/plugins/code/plugin.min.js` (+9 -1) ➖ `public/libs/tinymce/plugins/codesample/css/prism.css` (+0 -138) 📝 `public/libs/tinymce/plugins/codesample/plugin.min.js` (+9 -1) 📝 `public/libs/tinymce/plugins/colorpicker/plugin.min.js` (+9 -1) 📝 `public/libs/tinymce/plugins/contextmenu/plugin.min.js` (+9 -1) 📝 `public/libs/tinymce/plugins/directionality/plugin.min.js` (+9 -1) ➖ `public/libs/tinymce/plugins/emoticons/img/smiley-cool.gif` (+0 -0) ➖ `public/libs/tinymce/plugins/emoticons/img/smiley-cry.gif` (+0 -0) ➖ `public/libs/tinymce/plugins/emoticons/img/smiley-embarassed.gif` (+0 -0) _...and 80 more files_ </details> ### 📄 Description Work in progress. Upgrading TinyMCE 4 to 5. Cleanup of codebase while at it. Plan is to get functional/usable compatibility against existing TinyMCE 4 instance. As planned in https://github.com/BookStackApp/BookStack/issues/2738#issuecomment-1022683101. ### Elements to review - [x] Dark mode - [x] Responsive toolbar - [x] Codemirror blocks throwing cursor position on focus - [x] Ensure text/bg color "no-color" option is clickable. - [x] RTL/LTR controls - [x] Licenses - [x] Custom hooks - [x] Extract code/codemirror to seperate async bundle. - [x] Review TODOs ### Translation Notes Add custom language like so: ```js window.tinymce.addI18n('beans', { "Redo": "Bean forward", "Undo": "Bean back", "Callouts": "Beanouts", }); ``` It's simply a [en => translation] mapping. Everything otherwise handled automatically. Enable in config via `language` option: ```js { language: 'beans', } ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:25:56 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6164