Skip to content

Commit

Permalink
Update item description to support rich text #1281
Browse files Browse the repository at this point in the history
  • Loading branch information
advplyr committed Jan 25, 2025
1 parent e21d37b commit fb9ca7f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion assets/defaultStyles.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,16 @@
text-indent: 0px !important;
text-align: start !important;
text-align-last: start !important;
}
}

.default-style.less-spacing p {
margin-block-start: 0;
}

.default-style.less-spacing ul {
margin-block-start: 0;
}

.default-style.less-spacing ol {
margin-block-start: 0;
}
2 changes: 1 addition & 1 deletion pages/item/_id/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
</div>

<div v-if="description" class="w-full py-2">
<p ref="description" class="text-sm text-justify whitespace-pre-line font-light" :class="{ 'line-clamp-4': !showFullDescription }" style="hyphens: auto">{{ description }}</p>
<div ref="description" class="default-style less-spacing text-sm text-justify whitespace-pre-line font-light" :class="{ 'line-clamp-4': !showFullDescription }" style="hyphens: auto" v-html="description" />

<div v-if="descriptionClamped" class="text-fg text-sm py-2" @click="showFullDescription = !showFullDescription">
{{ showFullDescription ? $strings.ButtonReadLess : $strings.ButtonReadMore }}
Expand Down

0 comments on commit fb9ca7f

Please sign in to comment.