Skip to content

Commit

Permalink
Fix bug where read-only text blocks does not process markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
greentfrapp committed Sep 1, 2022
1 parent 517377a commit df2663a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/components/blocks/QuoteBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
v-model="props.block.details.value"
class="py-1.5 border-l-3 border-black border-solid px-3"
/>
<div v-else v-html="props.block.details.value"
<div v-else v-html="markdownToHtml(props.block.details.value)"
class="py-1.5 border-l-3 border-black border-solid px-3"></div>
</template>

<script setup lang="ts">
import { PropType } from "vue";
import { Block } from "@/utils/types";
import Editor from "../elements/Editor.vue";
import { Block } from "@/utils/types"
import { markdownToHtml } from '@/utils/utils'
import Editor from "../elements/Editor.vue"
const props = defineProps({
block: {
Expand Down
3 changes: 2 additions & 1 deletion src/components/blocks/TextBlock.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<template>
<Editor v-if="!props.readonly" v-model="props.block.details.value"
class="py-1.5" />
<div v-else v-html="props.block.details.value"
<div v-else v-html="markdownToHtml(props.block.details.value)"
class="py-1.5"></div>
</template>

<script setup lang="ts">
import { PropType } from 'vue'
import { Block } from '@/utils/types'
import { markdownToHtml } from '@/utils/utils'
import Editor from '../elements/Editor.vue'
const props = defineProps({
Expand Down

0 comments on commit df2663a

Please sign in to comment.