-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support rich text book descriptions #3880
Conversation
This is working great in my testing. We only needed |
I just updated the mobile app for this and realized the |
Oh, I forgot about the mobile client. The 3rd-party apps might break as well. |
They would show html tags for new/updated descriptions but I will include in the release notes that |
Wonderful! Does this support Markdown, or only HTML? And is it possible to store rich text in audio metadata (ID3, etc.) and have Audiobookshelf use it? |
Only HTML. Also, you cannot edit the HTML directly - only through the rich text editor.
I focused mainly on metadata editing, and on metadata obtained through match providers (like Audible and iTunes), and I believe I haven't changed anything in metadata obtained from audio files. I expect that if the ID3 description field contains html, Audiobookshelf should read it and use it. I'll check, and if doesn't work I'll fix it. Update: yes, it seems to be working as expected. |
Brief summary
Add support for rich text in book descriptions (including matching and editing).
Which issue is fixed?
Fixes #1820, #3786
In-depth Description
This adds the following:
The following changes were made:
BookDetailsEdit.vue
andMatch.vue
text-area-with-label
withrich-text-editor
for the description field.RichTextEditor.vue
style="margin-top: 0; margin-bottom: 0.125em"
to the label. This was to make it more compatible withTextareaWithLabel
.blur
method to the editor. This is required byDetails.vue
.config
prop. It was moved intoVueTrix
.VueTrix.vue
enableBreakParagraphOnReturn
into the static initialization block (since it only does static initialization).defaultStyles.css
less-spacing
class to thep
andul
tags. I think the current spacing (1em both before and after each block element) is a bit too much.ViewEpisode.vue
andpages/item/_id/index.vue
trix.css
trix-content
class to inherit the line-height from the parent element.trix-content p
to modify how the editor renders thep
tags.defaultStyles.css
, because I thought the editor should be more compact than the displayed text, but please change it if you don't like it.BookFinder.js
runSearch
method, instead of the various providers.book.descriptionPlain
to store a fully tag-stripped version of the description.BookMatchCard.vue
. I'm not sure if this is really required - maybe it's not a big deal if the card shows some html tags.Book.js
descriptionPlain
to JSON outputs.Currently
description in the selected match inMatch.vue
. I'm not sure if what I did is the best way, and I'm not even sure it's really required (if we just usedescription
instead, the only difference would be that theCurrently
might show a few html tags - maybe not a big deal).htmlSanitizer.js
How have you tested this?