[PR #2176] [CLOSED] Support rich text descriptions #3665

Closed
opened 2026-04-25 00:16:33 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/2176
Author: @MxMarx
Created: 10/3/2023
Status: Closed

Base: masterHead: rich-text-descriptions


📝 Commits (4)

📊 Changes

12 files changed (+51 additions, -30 deletions)

View changed files

📝 client/assets/trix.css (+1 -1)
📝 client/components/cards/BookMatchCard.vue (+1 -1)
📝 client/components/modals/item/tabs/Match.vue (+3 -3)
📝 client/components/ui/RichTextEditor.vue (+31 -14)
📝 client/components/ui/VueTrix.vue (+4 -3)
📝 client/components/widgets/BookDetailsEdit.vue (+1 -1)
📝 client/pages/item/_id/index.vue (+1 -1)
📝 server/providers/Audible.js (+2 -1)
📝 server/providers/iTunes.js (+2 -1)
📝 server/utils/htmlSanitizer.js (+1 -1)
📝 server/utils/parsers/parseOpfMetadata.js (+1 -1)
📝 server/utils/toneHelpers.js (+3 -2)

📄 Description

Alternative to #2161

This uses the trix editor that's currently used to include rich text for podcast episodes to enable rich text in book descriptions, and preserves descriptions grabbed from iTunes, Audible, and epubs in html. A descriptionPlain field is also returned by compatible providers so that the description preview when searching in match tab doesn't show html tags.
Additionally, the current description line in the match tab is truncated with css and shows the full description when hovering.

To preserve compatibility, html is stripped from the descriptions when embedding metadata in audio files.

The hover text for buttons doesn't seem to work if getDefaultHTML is provided as it is currently to remove unused toolbar buttons, so I also hardcoded the button labels.

Also, this is literally the first thing I've done with javascript so I'm probably not the right person to do this but I tried anyway, hopefully this doesn't cause too much annoyance!

resolves #617
resolves #1820


🔄 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/advplyr/audiobookshelf/pull/2176 **Author:** [@MxMarx](https://github.com/MxMarx) **Created:** 10/3/2023 **Status:** ❌ Closed **Base:** `master` ← **Head:** `rich-text-descriptions` --- ### 📝 Commits (4) - [`082a1e5`](https://github.com/advplyr/audiobookshelf/commit/082a1e5bcac633ce30afe157d348f8be7ac25dd3) support rich text book descriptions - [`089e4b4`](https://github.com/advplyr/audiobookshelf/commit/089e4b47db9eaab4bd99e840c5e7ed57cc5ea01d) Merge branch 'rich-text-descriptions' of https://github.com/MxMarx/audiobookshelf into rich-text-descriptions - [`675fbc6`](https://github.com/advplyr/audiobookshelf/commit/675fbc6d762bdf475f3c81b6d323ffed4c5ea735) strip html when embedding metadata - [`fcfc657`](https://github.com/advplyr/audiobookshelf/commit/fcfc657777d4ca3c71bb73e25a9e57b74bf55bbf) preserve bold and italic from audible ### 📊 Changes **12 files changed** (+51 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `client/assets/trix.css` (+1 -1) 📝 `client/components/cards/BookMatchCard.vue` (+1 -1) 📝 `client/components/modals/item/tabs/Match.vue` (+3 -3) 📝 `client/components/ui/RichTextEditor.vue` (+31 -14) 📝 `client/components/ui/VueTrix.vue` (+4 -3) 📝 `client/components/widgets/BookDetailsEdit.vue` (+1 -1) 📝 `client/pages/item/_id/index.vue` (+1 -1) 📝 `server/providers/Audible.js` (+2 -1) 📝 `server/providers/iTunes.js` (+2 -1) 📝 `server/utils/htmlSanitizer.js` (+1 -1) 📝 `server/utils/parsers/parseOpfMetadata.js` (+1 -1) 📝 `server/utils/toneHelpers.js` (+3 -2) </details> ### 📄 Description Alternative to #2161 This uses the trix editor that's currently used to include rich text for podcast episodes to enable rich text in book descriptions, and preserves descriptions grabbed from iTunes, Audible, and epubs in html. A `descriptionPlain` field is also returned by compatible providers so that the description preview when searching in match tab doesn't show html tags. Additionally, the current description line in the match tab is truncated with css and shows the full description when hovering. To preserve compatibility, html is stripped from the descriptions when embedding metadata in audio files. The hover text for buttons doesn't seem to work if `getDefaultHTML` is provided as it is currently to remove unused toolbar buttons, so I also hardcoded the button labels. Also, this is literally the first thing I've done with javascript so I'm probably not the right person to do this but I tried anyway, hopefully this doesn't cause too much annoyance! resolves #617 resolves #1820 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:16:33 +02:00
adam closed this issue 2026-04-25 00:16:33 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3665