react-mobiledoc-renderer
v0.1.0
Published
A Mobiledoc renderer for React written with Typescript
Downloads
5
Maintainers
Readme
Mobiledoc Renderer for React
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>;