mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-19 04:34:33 -05:00
add markdown support for description
This commit is contained in:
parent
d1c43f432a
commit
372c6b9078
@ -20,6 +20,9 @@
|
||||
<div class="my-3">
|
||||
<label for="description" class="form-label">{{ $t("Description") }}</label>
|
||||
<textarea id="description" v-model="config.description" class="form-control"></textarea>
|
||||
<div class="form-text">
|
||||
{{ $t("markdownSupported") }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Footer Text -->
|
||||
@ -258,7 +261,9 @@
|
||||
|
||||
<!-- Description -->
|
||||
<strong v-if="editMode">{{ $t("Description") }}:</strong>
|
||||
<Editable v-model="config.description" :contenteditable="editMode" tag="div" class="mb-4 description" />
|
||||
<Editable v-if="enableEditMode" v-model="config.description" :contenteditable="editMode" tag="div" class="mb-4 description" />
|
||||
<!-- eslint-disable-next-line vue/no-v-html-->
|
||||
<div v-if="! enableEditMode" class="alert-heading p-2" v-html="descriptionHTML"></div>
|
||||
|
||||
<div v-if="editMode" class="mb-4">
|
||||
<div>
|
||||
@ -500,6 +505,10 @@ export default {
|
||||
return DOMPurify.sanitize(marked(this.incident.content));
|
||||
},
|
||||
|
||||
descriptionHTML() {
|
||||
return DOMPurify.sanitize(marked(this.config.description));
|
||||
},
|
||||
|
||||
footerHTML() {
|
||||
return DOMPurify.sanitize(marked(this.config.footerText));
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user