0.1.0 • Published 3 years ago
@kong-ui/portal-document-viewer v0.1.0
@kong-ui/portal-document-viewer
A Kong UI component for rendering markdown documents
Features
- Render
.mdcontent - Customize display of markdown content in the UI
Requirements
vuemust be initialized in the host application
Usage
Install
Install the component in your host application
yarn add @kong-ui/portal-document-viewerRegister
You can register portal-document-viewer globally or locally.
// Global registration
import { createApp } from 'vue'
import DocumentViewer from '@kong-ui/portal-document-viewer'
import '@kong-ui/portal-document-viewer/dist/style.css'
const app = createApp(App)
app.use(DocumentViewer)<!-- Local registration -->
<template>
<DocumentViewer />
</template>
<script setup lang="ts">
import DocumentViewer from '@kong-ui/portal-document-viewer'
import '@kong-ui/portal-document-viewer/dist/style.css'
</script>Props
document
- type:
String|Object - required:
true - default:
null
Markdown object or string. Required.
0.1.0
3 years ago