Skip to content

Commit

Permalink
allow html
Browse files Browse the repository at this point in the history
  • Loading branch information
stepanenko3 committed May 17, 2022
1 parent 3b203d5 commit 105b095
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/js/field.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions dist/js/field.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/

/*!
* vuex v4.0.2
* (c) 2021 Evan You
* @license MIT
*/

/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
6 changes: 5 additions & 1 deletion resources/js/components/DetailField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
computed: {
excerpt() {
return md(this.field.preset).render(this.field.value || '')
return md(this.field.preset, {
html: true,
xhtmlOut: true,
linkify: true,
}).render(this.field.value || '')
},
},
}
Expand Down
13 changes: 12 additions & 1 deletion resources/js/components/FormField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,11 @@
},
previewContent() {
return md(this.currentField.preset).render(this.rawContent() || '')
return md(this.currentField.preset, {
html: true,
xhtmlOut: true,
linkify: true,
}).render(this.rawContent() || '')
},
},
Expand Down Expand Up @@ -540,3 +544,10 @@
},
}
</script>
<style>
.markdown img,
.markdown svg {
display: inline-block !important;
}
</style>

0 comments on commit 105b095

Please sign in to comment.