mirror of
https://github.com/hay-kot/homebox.git
synced 2025-07-27 04:40:27 +00:00
feat: markdown support (#165)
* initial markdown support via markdown-it * sanitize markup * remove pre-padding * fix linter errors
This commit is contained in:
parent
d2aa022347
commit
974d6914a2
8 changed files with 1396 additions and 1049 deletions
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { CustomDetail, Detail, Details } from "~~/components/global/DetailsSection/types";
|
||||
import { AnyDetail, Detail, Details } from "~~/components/global/DetailsSection/types";
|
||||
import { ItemAttachment } from "~~/lib/api/types/data-contracts";
|
||||
|
||||
definePageMeta({
|
||||
|
@ -87,6 +87,7 @@
|
|||
return [
|
||||
{
|
||||
name: "Description",
|
||||
type: "markdown",
|
||||
text: item.value?.description,
|
||||
},
|
||||
{
|
||||
|
@ -111,6 +112,7 @@
|
|||
},
|
||||
{
|
||||
name: "Notes",
|
||||
type: "markdown",
|
||||
text: item.value?.notes,
|
||||
},
|
||||
...assetID.value,
|
||||
|
@ -125,7 +127,7 @@
|
|||
name: field.name,
|
||||
text: url.text,
|
||||
href: url.url,
|
||||
} as CustomDetail;
|
||||
} as AnyDetail;
|
||||
}
|
||||
|
||||
return {
|
||||
|
@ -214,6 +216,7 @@
|
|||
|
||||
details.push({
|
||||
name: "Warranty Details",
|
||||
type: "markdown",
|
||||
text: item.value?.warrantyDetails || "",
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue