[PR #4729] [MERGED] Simple WYSIWYG for description fields and comments #6398

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

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/4729
Author: @ssddanbrown
Created: 12/16/2023
Status: Merged
Merged: 12/22/2023
Merged by: @ssddanbrown

Base: developmentHead: description_wysiwyg


📝 Commits (10+)

  • 569542f Input WYSIWYG: Added compontent and rough logic to book form
  • c622b78 Input WYSIWYG: Added description_html field, added store logic
  • 307fae3 Input WYSIWYG: Added reference store & fetch handling
  • bc354e8 Input WYSIWYG: Updated reference link updating for descriptions
  • c07aa05 Input WYSIWYG: Updated UpdateUrlCommand, Added chapter HTML display
  • 2fbed39 Input WYSIWYG: Added dynamic options for entity selector popups
  • 077b970 Input WYSIWYG: Added testing for description references
  • 7fd6d5b Input WYSIWYG: Updated tests, Added simple html limiting
  • a21ca44 Input WYSIWYG: Fixed existing tests, fixed empty description handling
  • ed5d67e Input WYSIWYG: Aligned newline handling with old descriptions

📊 Changes

85 files changed (+1201 additions, -334 deletions)

View changed files

📝 app/Console/Commands/RegenerateReferencesCommand.php (+1 -1)
📝 app/Console/Commands/UpdateUrlCommand.php (+3 -0)
📝 app/Entities/Controllers/BookApiController.php (+27 -13)
📝 app/Entities/Controllers/BookController.php (+3 -3)
📝 app/Entities/Controllers/BookshelfApiController.php (+34 -20)
📝 app/Entities/Controllers/BookshelfController.php (+14 -18)
📝 app/Entities/Controllers/ChapterApiController.php (+36 -16)
📝 app/Entities/Controllers/ChapterController.php (+17 -12)
📝 app/Entities/Controllers/PageController.php (+1 -1)
📝 app/Entities/Models/Book.php (+4 -3)
📝 app/Entities/Models/BookChild.php (+1 -1)
📝 app/Entities/Models/Bookshelf.php (+3 -2)
📝 app/Entities/Models/Chapter.php (+3 -2)
📝 app/Entities/Models/Entity.php (+7 -2)
app/Entities/Models/HasHtmlDescription.php (+21 -0)
📝 app/Entities/Models/Page.php (+2 -1)
📝 app/Entities/Repos/BaseRepo.php (+31 -10)
📝 app/Entities/Repos/PageRepo.php (+2 -4)
app/Entities/Tools/MixedEntityListLoader.php (+103 -0)
📝 app/References/ReferenceController.php (+7 -9)

...and 65 more files

📄 Description

Todo

  • Finish up WYSIWYG implementation.
  • Update entity selector to change details (endpoint, types) dynamically depending on route in.
  • Apply to books, chapters and shelves.
    • Create description_html fields for each.
    • Add handling for formatting to existing compatible text property.
    • Add filtering to field.
    • Parse content for references.
    • Add handling for reference updates.
    • Ensure content still indexed as expected for search.
  • Update API to expose new HTML field.
    • Ensure that updating existing description text still works, in addition to HTML.
    • Update API docs requests and responses for changes made.
  • Update "Update system URL" command to take new HTML fields into account.
  • Update book/chapter export handling of HTML descriptions.
  • Test how existing newlines in descriptions are upgraded.
  • Test content copying works with changes.
  • Test content conversion (promotion) works with changes.
  • Test reference lists relations (and relations shown within like book/chapter breadcrumb) are permission limited.
  • Test across dark mode.
  • Test across browsers.
  • Test RTL.
  • Add/update tests to cover.
    • References from
    • Reference updating
    • API endpoints
    • Export handling
    • URL Command
    • Input display
    • Editing/Creating each

#4085, #2354


🔄 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/4729 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 12/16/2023 **Status:** ✅ Merged **Merged:** 12/22/2023 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `description_wysiwyg` --- ### 📝 Commits (10+) - [`569542f`](https://github.com/BookStackApp/BookStack/commit/569542f0bb519bf9a52a6565780a7e610ff12130) Input WYSIWYG: Added compontent and rough logic to book form - [`c622b78`](https://github.com/BookStackApp/BookStack/commit/c622b785a969075bbc59129471d42d2df7377ea8) Input WYSIWYG: Added description_html field, added store logic - [`307fae3`](https://github.com/BookStackApp/BookStack/commit/307fae39c450f687aba93e589e947e5389357601) Input WYSIWYG: Added reference store & fetch handling - [`bc354e8`](https://github.com/BookStackApp/BookStack/commit/bc354e8b12a19ed96eab669f0926f517671c7c3e) Input WYSIWYG: Updated reference link updating for descriptions - [`c07aa05`](https://github.com/BookStackApp/BookStack/commit/c07aa056c2e42974826285cd8e614ae49db24b4b) Input WYSIWYG: Updated UpdateUrlCommand, Added chapter HTML display - [`2fbed39`](https://github.com/BookStackApp/BookStack/commit/2fbed3919bce377c7091c35503e8bea8cd1f9754) Input WYSIWYG: Added dynamic options for entity selector popups - [`077b970`](https://github.com/BookStackApp/BookStack/commit/077b9709d44031605dabc470a567f4349f623b99) Input WYSIWYG: Added testing for description references - [`7fd6d5b`](https://github.com/BookStackApp/BookStack/commit/7fd6d5b2ccca0c4ea9740366da0dc8720dadc8ad) Input WYSIWYG: Updated tests, Added simple html limiting - [`a21ca44`](https://github.com/BookStackApp/BookStack/commit/a21ca446332a7020e54bea15171d4b6233ea3ab8) Input WYSIWYG: Fixed existing tests, fixed empty description handling - [`ed5d67e`](https://github.com/BookStackApp/BookStack/commit/ed5d67e6095639e1bd8a238bf77227ce2b97a5f8) Input WYSIWYG: Aligned newline handling with old descriptions ### 📊 Changes **85 files changed** (+1201 additions, -334 deletions) <details> <summary>View changed files</summary> 📝 `app/Console/Commands/RegenerateReferencesCommand.php` (+1 -1) 📝 `app/Console/Commands/UpdateUrlCommand.php` (+3 -0) 📝 `app/Entities/Controllers/BookApiController.php` (+27 -13) 📝 `app/Entities/Controllers/BookController.php` (+3 -3) 📝 `app/Entities/Controllers/BookshelfApiController.php` (+34 -20) 📝 `app/Entities/Controllers/BookshelfController.php` (+14 -18) 📝 `app/Entities/Controllers/ChapterApiController.php` (+36 -16) 📝 `app/Entities/Controllers/ChapterController.php` (+17 -12) 📝 `app/Entities/Controllers/PageController.php` (+1 -1) 📝 `app/Entities/Models/Book.php` (+4 -3) 📝 `app/Entities/Models/BookChild.php` (+1 -1) 📝 `app/Entities/Models/Bookshelf.php` (+3 -2) 📝 `app/Entities/Models/Chapter.php` (+3 -2) 📝 `app/Entities/Models/Entity.php` (+7 -2) ➕ `app/Entities/Models/HasHtmlDescription.php` (+21 -0) 📝 `app/Entities/Models/Page.php` (+2 -1) 📝 `app/Entities/Repos/BaseRepo.php` (+31 -10) 📝 `app/Entities/Repos/PageRepo.php` (+2 -4) ➕ `app/Entities/Tools/MixedEntityListLoader.php` (+103 -0) 📝 `app/References/ReferenceController.php` (+7 -9) _...and 65 more files_ </details> ### 📄 Description ### Todo - [x] Finish up WYSIWYG implementation. - [x] Update entity selector to change details (endpoint, types) dynamically depending on route in. - [x] Apply to books, chapters and shelves. - [x] Create `description_html` fields for each. - [x] Add handling for formatting to existing compatible text property. - [x] Add filtering to field. - [x] Parse content for references. - [x] Add handling for reference updates. - [x] Ensure content still indexed as expected for search. - [x] Update API to expose new HTML field. - [x] Ensure that updating existing description text still works, in addition to HTML. - [x] Update API docs requests and responses for changes made. - [x] Update "Update system URL" command to take new HTML fields into account. - [x] Update book/chapter export handling of HTML descriptions. - [x] Test how existing newlines in descriptions are upgraded. - [x] Test content copying works with changes. - [x] Test content conversion (promotion) works with changes. - [x] Test reference lists relations (and relations shown within like book/chapter breadcrumb) are permission limited. - [x] Test across dark mode. - [x] Test across browsers. - [x] Test RTL. - [x] Add/update tests to cover. - [x] References from - [x] Reference updating - [x] API endpoints - [x] Export handling - [x] URL Command - [x] Input display - [x] Editing/Creating each ### Related issues #4085, #2354 --- <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:31:15 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6398