[PR #5365] [MERGED] Range of fixes/updates for the new Lexical based editor #6483

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

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/5365
Author: @ssddanbrown
Created: 12/14/2024
Status: Merged
Merged: 12/20/2024
Merged by: @ssddanbrown

Base: developmentHead: lexical_fixes


📝 Commits (10+)

  • 97b201f Lexical: Added auto links on enter/space
  • a71aa24 Lexical: Added dark mode styles, fixed autolink range
  • 5f07f31 Lexical: Added mobile toolbar support
  • 2f119d3 Lexical: Adjusted modals and content area for mobile sizes
  • 3f86937 Lexical: Made summary part of details node
  • 5887322 Lexical: Added details toolbar
  • 8486775 Lexical: Added mulitple methods to escape details block
  • e50cd33 Lexical: Added testing for some added shortcuts
  • ace8af0 Lexical: Improved list tab handling, Improved test utils
  • fca8f92 Lexical: Aligned new empty item behaviour for nested lists

📊 Changes

43 files changed (+2028 additions, -823 deletions)

View changed files

dev/build/svg-blank-transform.js (+14 -0)
📝 jest.config.ts (+1 -0)
📝 lang/en/editor.php (+2 -0)
📝 resources/icons/editor/about.svg (+0 -0)
resources/icons/editor/details-toggle.svg (+1 -0)
📝 resources/js/wysiwyg-tinymce/plugins-about.js (+1 -1)
📝 resources/js/wysiwyg/index.ts (+7 -31)
📝 resources/js/wysiwyg/lexical/core/LexicalEditor.ts (+8 -0)
📝 resources/js/wysiwyg/lexical/core/LexicalNode.ts (+6 -1)
📝 resources/js/wysiwyg/lexical/core/__tests__/utils/index.ts (+105 -5)
📝 resources/js/wysiwyg/lexical/headless/__tests__/unit/LexicalHeadlessEditor.test.ts (+0 -1)
📝 resources/js/wysiwyg/lexical/html/index.ts (+5 -0)
📝 resources/js/wysiwyg/lexical/list/LexicalListItemNode.ts (+9 -2)
📝 resources/js/wysiwyg/lexical/list/__tests__/unit/LexicalListItemNode.test.ts (+528 -513)
📝 resources/js/wysiwyg/lexical/rich-text/LexicalDetailsNode.ts (+73 -58)
resources/js/wysiwyg/lexical/rich-text/__tests__/unit/LexicalDetailsNode.test.ts (+40 -0)
📝 resources/js/wysiwyg/nodes.ts (+2 -2)
resources/js/wysiwyg/services/__tests__/auto-links.test.ts (+91 -0)
resources/js/wysiwyg/services/__tests__/keyboard-handling.test.ts (+130 -0)
resources/js/wysiwyg/services/auto-links.ts (+74 -0)

...and 23 more files

📄 Description

Following feedback in #5245.

  • Adds auto-linking on space/enter press.
  • Adds dark-mode support.
  • Adds mobile support in UI and styles.
  • Adds "about/help" modal & button.
  • Details/collapsible blocks:
    • Added toolbar with actions
    • Made summary/label more consistent.
    • Added methods to escape block (arrow down on last element in block, or enter on empty last block).
  • Lists:
    • Improved single item indent selection retention.
    • Fixed lack of tab indent on empty list items.
    • Aligned behaviour newline on empty nested list, to un-nest list item instead of creating new nested list item.
    • Aligned nested/unnesting behaviour so that sibling/child items don't change level.

🔄 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/5365 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 12/14/2024 **Status:** ✅ Merged **Merged:** 12/20/2024 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `lexical_fixes` --- ### 📝 Commits (10+) - [`97b201f`](https://github.com/BookStackApp/BookStack/commit/97b201f61f98aaccf779d08634c247c8cfbbfbb5) Lexical: Added auto links on enter/space - [`a71aa24`](https://github.com/BookStackApp/BookStack/commit/a71aa241ada17bfc5497c59914774260003b3339) Lexical: Added dark mode styles, fixed autolink range - [`5f07f31`](https://github.com/BookStackApp/BookStack/commit/5f07f31c9fc21c4f82b757eb2e78027ff3ad6337) Lexical: Added mobile toolbar support - [`2f119d3`](https://github.com/BookStackApp/BookStack/commit/2f119d3033c9543a22109c34d2b77ef99e5486af) Lexical: Adjusted modals and content area for mobile sizes - [`3f86937`](https://github.com/BookStackApp/BookStack/commit/3f86937f74f2e5dc1e11fc2fd84694ce0793308f) Lexical: Made summary part of details node - [`5887322`](https://github.com/BookStackApp/BookStack/commit/5887322178c0fd95319ed104abee3bd4733c5d0d) Lexical: Added details toolbar - [`8486775`](https://github.com/BookStackApp/BookStack/commit/8486775edf9d7979f9d6f1f555460bf8678d6653) Lexical: Added mulitple methods to escape details block - [`e50cd33`](https://github.com/BookStackApp/BookStack/commit/e50cd33277026a93983b696014c6468a4d34fe6f) Lexical: Added testing for some added shortcuts - [`ace8af0`](https://github.com/BookStackApp/BookStack/commit/ace8af077dfa5173c24cdf8b50eb82ccbd1dbf7e) Lexical: Improved list tab handling, Improved test utils - [`fca8f92`](https://github.com/BookStackApp/BookStack/commit/fca8f928a380350a1a6441530a722f4578f8ae14) Lexical: Aligned new empty item behaviour for nested lists ### 📊 Changes **43 files changed** (+2028 additions, -823 deletions) <details> <summary>View changed files</summary> ➕ `dev/build/svg-blank-transform.js` (+14 -0) 📝 `jest.config.ts` (+1 -0) 📝 `lang/en/editor.php` (+2 -0) 📝 `resources/icons/editor/about.svg` (+0 -0) ➕ `resources/icons/editor/details-toggle.svg` (+1 -0) 📝 `resources/js/wysiwyg-tinymce/plugins-about.js` (+1 -1) 📝 `resources/js/wysiwyg/index.ts` (+7 -31) 📝 `resources/js/wysiwyg/lexical/core/LexicalEditor.ts` (+8 -0) 📝 `resources/js/wysiwyg/lexical/core/LexicalNode.ts` (+6 -1) 📝 `resources/js/wysiwyg/lexical/core/__tests__/utils/index.ts` (+105 -5) 📝 `resources/js/wysiwyg/lexical/headless/__tests__/unit/LexicalHeadlessEditor.test.ts` (+0 -1) 📝 `resources/js/wysiwyg/lexical/html/index.ts` (+5 -0) 📝 `resources/js/wysiwyg/lexical/list/LexicalListItemNode.ts` (+9 -2) 📝 `resources/js/wysiwyg/lexical/list/__tests__/unit/LexicalListItemNode.test.ts` (+528 -513) 📝 `resources/js/wysiwyg/lexical/rich-text/LexicalDetailsNode.ts` (+73 -58) ➕ `resources/js/wysiwyg/lexical/rich-text/__tests__/unit/LexicalDetailsNode.test.ts` (+40 -0) 📝 `resources/js/wysiwyg/nodes.ts` (+2 -2) ➕ `resources/js/wysiwyg/services/__tests__/auto-links.test.ts` (+91 -0) ➕ `resources/js/wysiwyg/services/__tests__/keyboard-handling.test.ts` (+130 -0) ➕ `resources/js/wysiwyg/services/auto-links.ts` (+74 -0) _...and 23 more files_ </details> ### 📄 Description Following feedback in #5245. - Adds auto-linking on space/enter press. - Adds dark-mode support. - Adds mobile support in UI and styles. - Adds "about/help" modal & button. - Details/collapsible blocks: - Added toolbar with actions - Made summary/label more consistent. - Added methods to escape block (arrow down on last element in block, or enter on empty last block). - Lists: - Improved single item indent selection retention. - Fixed lack of tab indent on empty list items. - Aligned behaviour newline on empty nested list, to un-nest list item instead of creating new nested list item. - Aligned nested/unnesting behaviour so that sibling/child items don't change level. --- <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:33:30 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6483