summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/issuable_show/components/issuable_description.vue
blob: 091a4be5bd8ae61f6502434c6b32084783d13fd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<script>
import $ from 'jquery';
import { GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import '~/behaviors/markdown/render_gfm';

export default {
  directives: {
    SafeHtml,
  },
  props: {
    issuable: {
      type: Object,
      required: true,
    },
  },
  mounted() {
    this.renderGFM();
  },
  methods: {
    renderGFM() {
      $(this.$refs.gfmContainer).renderGFM();
    },
  },
};
</script>

<template>
  <div class="description">
    <div ref="gfmContainer" v-safe-html="issuable.descriptionHtml" class="md"></div>
  </div>
</template>