Skip to content

Leadrive/react-native-draftjs-renderer

 
 

Repository files navigation

React Native Draft.js Render

A React Native render for Draft.js model and works great with react-draft-wysiwyg.

Getting Started

Install React Native Draft.js Render on your React Native project, using NPM or Yarn:

npm i -S react-native-draftjs-renderer
# or...
yarn add react-native-draftjs-renderer

Using

Just import and insert your Draft.js model on RNDraftJSRender:

import React from 'react';
import {
  AppRegistry,
} from 'react-native';

import RNDraftJSRender from 'react-native-draftjs-renderer';
import contentState from 'DraftJs/contentState';

const MyApp = () => (
  <RNDraftJSRender
    contentState={contentState}
  />
);

AppRegistry.registerComponent('MyApp', () => MyApp);

TODO:

  • [Android] Justify text content support.

UPDATE:

1.1.1

  • Minor style change.

1.1.0

  • Remove dynamic Image height support, which will cause image blink.

1.0.1

  • Fix the image auto height crop problem.
  • Fix fontSize can not be over 14 bug.
  • Increase the Text padding size to 2.
  • Add dynamic Image height support.

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 93.5%
  • Makefile 6.5%