JSPM

@nstudio/nativescript-markdown-view

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 183
  • Score
    100M100P100Q105335F
  • License Apache-2.0

A NativeScript view for displaying natively rendered Markdown.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@nstudio/nativescript-markdown-view) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @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