react-mobiledoc-renderer
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

Mobiledoc Renderer for React

A Mobiledoc renderer for React written with Typescript

License NPM Version NPM Downloads

Allows injection of custom React components for greater control over the rendering and uses a plugin-type pattern allowing for easy extension and customization.


Warning This is pre-production code and still under active development. Use at your own risk.

Table of Contents

Installation

Install the module using npm install:

npm install react-mobiledoc-renderer

Usage

To use the module, simply import it into your code and use as follows:

import Renderer from 'react-mobiledoc-renderer';

const renderer = new Renderer({
  // ...see below for options
});

const mobiledoc = {
  // mobiledoc document object
};

// note that the .render() method is async
const { result } = await renderer.render(mobiledoc);

// the `result` is a React element
return <article>{result}</article>;

/react-mobiledoc-renderer/

    Package Sidebar

    Install

    npm i react-mobiledoc-renderer

    Weekly Downloads

    0

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    37.3 kB

    Total Files

    19

    Last publish

    Collaborators

    • abstractvector