Welcome to mirror list, hosted at ThFree Co, Russian Federation.

issuable_description.vue « components « show « issuable « vue_shared « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ce1851ab873caa04b27b21ad5de22cb38358225d (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<script>
import SafeHtml from '~/vue_shared/directives/safe_html';
import { renderGFM } from '~/behaviors/markdown/render_gfm';

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

<template>
  <div
    class="description"
    :class="{ 'js-task-list-container': canEdit && enableTaskList }"
    data-qa-selector="description_content"
  >
    <div ref="gfmContainer" v-safe-html="issuable.descriptionHtml" class="md"></div>
    <textarea
      v-if="issuable.description && enableTaskList"
      ref="textarea"
      :value="issuable.description"
      :data-update-url="taskListUpdatePath"
      class="gl-display-none js-task-list-field"
      dir="auto"
    >
    </textarea>
  </div>
</template>