@nstudio/nativescript-markdown-view
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@nstudio/nativescript-markdown-view

A NativeScript view for displaying natively rendered Markdown.

Uses Markwon on Android and TSMarkdownParser on iOS.

npm install @nstudio/nativescript-markdown-view

If using vanilla core:

<!-- test-page.xml -->
<Page xmlns="http://schemas.nativescript.org/tns.xsd" loaded="pageLoaded" xmlns:mv="@nstudio/nativescript-markdown-view">
    <StackLayout class="p-20">
        <mv:MarkdownView markdown="_This_ should be **bold**!" />
    </StackLayout>
</Page>

When using flavors, you can register the element for usage in your markup:

import { MarkdownView } from '@nstudio/nativescript-markdown-view'

// Angular
import { registerElement } from '@nativescript/angular'
registerElement('MarkdownView', () => MarkdownView)

// Solid
import { registerElement } from 'dominative';
registerElement('markdownview', MarkdownView);

// Svelte
import { registerNativeViewElement } from 'svelte-native/dom'
registerNativeViewElement('markdownview', () => MarkdownView);

// React
import { registerElement } from 'react-nativescript';
registerElement('markdownview', () => MarkdownView);

// Vue
import Vue from 'nativescript-vue'
Vue.registerElement('MarkdownView', () => MarkdownView)

Use MarkdownView anywhere.

<MarkdownView markdown="_This_ should be **bold**!" />

API

Property Default Description
markdown "" The markdown to be rendered on screen

Credits

License

Apache License Version 2.0

Package Sidebar

Install

npm i @nstudio/nativescript-markdown-view

Weekly Downloads

0

Version

1.0.0

License

Apache-2.0

Unpacked Size

22.1 kB

Total Files

15

Last publish

Collaborators

  • nativescript-bot
  • multishiv19
  • rigor789
  • alexziskind1
  • walkerrunpdx
  • bradmartin
  • davecoffin
  • triniwiz