@kong-ui/portal-document-viewer
v0.1.0
Published
A Kong UI component for rendering markdown documents
Downloads
4
Readme
@kong-ui/portal-document-viewer
A Kong UI component for rendering markdown documents
Features
- Render
.md
content - Customize display of markdown content in the UI
Requirements
vue
must be initialized in the host application
Usage
Install
Install the component in your host application
yarn add @kong-ui/portal-document-viewer
Register
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.