[PR #5058] [MERGED] Lexical based editor #6446

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

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/5058
Author: @ssddanbrown
Created: 6/6/2024
Status: Merged
Merged: 9/27/2024
Merged by: @ssddanbrown

Base: developmentHead: lexical


📝 Commits (10+)

  • 5a4f595 Editors: Added lexical editor for testing
  • 6e852d2 Lexical: Played with commands, extracted & improved callout node
  • 49546cd Lexical: Switched to ts for new editor build
  • 0f8bd86 Lexical: Added custom id-supporting paragraph blocks
  • b24d60e Lexical: Started UI fundementals with basic button
  • 483d9bf Lexical: Added a range of format buttons
  • dc1a40e Lexical: Added ui container type
  • 57259ae Lexical: Added format previews to format buttons
  • ae98745 Lexical: Started on form UI
  • 7c504a1 Lexical: Created core modal functionality

📊 Changes

302 files changed (+66176 additions, -2431 deletions)

View changed files

📝 .github/workflows/lint-js.yml (+2 -2)
.github/workflows/test-js.yml (+29 -0)
📝 .gitignore (+1 -0)
📝 app/Entities/Models/Page.php (+1 -0)
📝 app/Entities/Repos/PageRepo.php (+7 -4)
📝 app/Entities/Tools/PageEditorData.php (+7 -15)
app/Entities/Tools/PageEditorType.php (+37 -0)
📝 dev/build/esbuild.js (+10 -0)
jest.config.ts (+209 -0)
📝 lang/en/entities.php (+2 -0)
📝 package-lock.json (+5607 -1828)
📝 package.json (+14 -4)
📝 readme.md (+1 -0)
resources/icons/caret-down-large.svg (+1 -0)
📝 resources/icons/close.svg (+1 -1)
resources/icons/editor/align-center.svg (+1 -0)
resources/icons/editor/align-justify.svg (+1 -0)
resources/icons/editor/align-left.svg (+1 -0)
resources/icons/editor/align-right.svg (+1 -0)
resources/icons/editor/bold.svg (+1 -0)

...and 80 more files

📄 Description

Playing with the idea of using Lexical as a new editor, to eventually replace TinyMCE.
A lot of work though, not looking forward to tables 😱.
Switching direct from TinyMCE would be a hard landing, as the schema/structure imposed does is more strict than what TinyMCE would accept in our configuration, and there's bound to be many differences.
Would want to release in parallel, first as opt-in, then opt-out, then remove TinyMCE.

Related to #4908


🔄 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/5058 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 6/6/2024 **Status:** ✅ Merged **Merged:** 9/27/2024 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `lexical` --- ### 📝 Commits (10+) - [`5a4f595`](https://github.com/BookStackApp/BookStack/commit/5a4f59534124a83b9d7b54abe1d5c8984b2fa04f) Editors: Added lexical editor for testing - [`6e852d2`](https://github.com/BookStackApp/BookStack/commit/6e852d2e652e881e5f0096efa2b35ae3d712b4a3) Lexical: Played with commands, extracted & improved callout node - [`49546cd`](https://github.com/BookStackApp/BookStack/commit/49546cd627f4595cc245cad7e282d6c1f8506fd6) Lexical: Switched to ts for new editor build - [`0f8bd86`](https://github.com/BookStackApp/BookStack/commit/0f8bd869d8bb0ef3f7318dfe03aa122b87cc9b0d) Lexical: Added custom id-supporting paragraph blocks - [`b24d60e`](https://github.com/BookStackApp/BookStack/commit/b24d60e98d0c990f2a5d0cdf3a09b6d37fc2f195) Lexical: Started UI fundementals with basic button - [`483d9bf`](https://github.com/BookStackApp/BookStack/commit/483d9bf26ca5db0de17aa6fbf775874a596e4782) Lexical: Added a range of format buttons - [`dc1a40e`](https://github.com/BookStackApp/BookStack/commit/dc1a40ea7465277ae82027e07926e230549c89f0) Lexical: Added ui container type - [`57259ae`](https://github.com/BookStackApp/BookStack/commit/57259aee00206785f371cbaff8ca30711f025172) Lexical: Added format previews to format buttons - [`ae98745`](https://github.com/BookStackApp/BookStack/commit/ae987454392a994b350841cbc35f61e0903eebaa) Lexical: Started on form UI - [`7c504a1`](https://github.com/BookStackApp/BookStack/commit/7c504a10a8026135bd5237911a91446b3c727f57) Lexical: Created core modal functionality ### 📊 Changes **302 files changed** (+66176 additions, -2431 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/lint-js.yml` (+2 -2) ➕ `.github/workflows/test-js.yml` (+29 -0) 📝 `.gitignore` (+1 -0) 📝 `app/Entities/Models/Page.php` (+1 -0) 📝 `app/Entities/Repos/PageRepo.php` (+7 -4) 📝 `app/Entities/Tools/PageEditorData.php` (+7 -15) ➕ `app/Entities/Tools/PageEditorType.php` (+37 -0) 📝 `dev/build/esbuild.js` (+10 -0) ➕ `jest.config.ts` (+209 -0) 📝 `lang/en/entities.php` (+2 -0) 📝 `package-lock.json` (+5607 -1828) 📝 `package.json` (+14 -4) 📝 `readme.md` (+1 -0) ➕ `resources/icons/caret-down-large.svg` (+1 -0) 📝 `resources/icons/close.svg` (+1 -1) ➕ `resources/icons/editor/align-center.svg` (+1 -0) ➕ `resources/icons/editor/align-justify.svg` (+1 -0) ➕ `resources/icons/editor/align-left.svg` (+1 -0) ➕ `resources/icons/editor/align-right.svg` (+1 -0) ➕ `resources/icons/editor/bold.svg` (+1 -0) _...and 80 more files_ </details> ### 📄 Description Playing with the idea of using [Lexical](https://lexical.dev/) as a new editor, to eventually replace TinyMCE. A lot of work though, not looking forward to tables :scream:. Switching direct from TinyMCE would be a hard landing, as the schema/structure imposed does is more strict than what TinyMCE would accept in our configuration, and there's bound to be many differences. Would want to release in parallel, first as opt-in, then opt-out, then remove TinyMCE. Related to #4908 --- <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:32:29 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6446