Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 11x | // @implements UC-SPACE-010.1
/** A page's rich text, rendered by utils/richText.ts (never as HTML) */
import { defineComponent, h, type PropType } from 'vue'
import { renderNodes } from '@/utils/richText'
import type { RichTextNode } from '@/utils/spacePages'
export default defineComponent({
name: 'RichTextView',
props: {
doc: { type: Object as PropType<RichTextNode | null | undefined>, default: null }
},
setup(props) {
return () => h('div', { class: 'rich-text' }, renderNodes(props.doc?.content))
}
})
|