All Projects → globocom → React Native Draftjs Render

globocom / React Native Draftjs Render

Licence: mit
React Native render for draft.js model

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Native Draftjs Render

iflux2
Reactive state container (based on immutable) for React or ReactNative, inspired by mapreduce.
Stars: ✭ 50 (-86.41%)
Mutual labels:  reactnative
shop-app
A shopping mobile application made with react native for Android.
Stars: ✭ 100 (-72.83%)
Mutual labels:  reactnative
Reactnative Hupujrs
A Third-party Hupu App (http://bbs.hupu.com/) client implemented using React Native (Android and iOS).
Stars: ✭ 260 (-29.35%)
Mutual labels:  reactnative
react-native-input-bar
Fully customizable, beautifully designed Input Bar for React Native
Stars: ✭ 32 (-91.3%)
Mutual labels:  reactnative
react-native-hybrid-app
Demo application ofReact Native Hybrid Application (ReactNative + Redux + RxJs)
Stars: ✭ 15 (-95.92%)
Mutual labels:  reactnative
reactnative-relay-offline
Demo of how to use relay offline with React Native
Stars: ✭ 17 (-95.38%)
Mutual labels:  reactnative
Eorg
new version: https://github.com/SoftMaple/Editor
Stars: ✭ 27 (-92.66%)
Mutual labels:  draft-js
Reactnativecomponents
React Native组件大全,介绍React Native常用组件的使用方法和使用示例
Stars: ✭ 317 (-13.86%)
Mutual labels:  reactnative
draftjs-conductor
📝✨ Little Draft.js helpers to make rich text editors “just work”
Stars: ✭ 39 (-89.4%)
Mutual labels:  draft-js
sebastienlorber.com
My personal website
Stars: ✭ 52 (-85.87%)
Mutual labels:  reactnative
react-native-slideable-calendar-strip
A react native calendar strip that support swipe!
Stars: ✭ 86 (-76.63%)
Mutual labels:  reactnative
mobimoney
Cross-platform mobile payments project for React Native
Stars: ✭ 14 (-96.2%)
Mutual labels:  reactnative
docs-soap
Library to clean up the clipboard contents generated by google docs
Stars: ✭ 17 (-95.38%)
Mutual labels:  draft-js
react-native-month-picker
This is a month picker to use in react native mobile apps.
Stars: ✭ 16 (-95.65%)
Mutual labels:  reactnative
Vasern
Vasern is a fast, lightweight and open source data storage for React Native
Stars: ✭ 283 (-23.1%)
Mutual labels:  reactnative
react-native-jsi-template
Template library and blog that explain how JSI modules are built from scratch in React Native
Stars: ✭ 84 (-77.17%)
Mutual labels:  reactnative
React-Native-Integration-with-existing-app
React Native Integration with existing app
Stars: ✭ 53 (-85.6%)
Mutual labels:  reactnative
Craft.js
🚀 A React Framework for building extensible drag and drop page editors
Stars: ✭ 4,512 (+1126.09%)
Mutual labels:  draft-js
Status React
a free (libre) open source, mobile OS for Ethereum
Stars: ✭ 3,307 (+798.64%)
Mutual labels:  reactnative
rechord
Let's share your chord progressions!
Stars: ✭ 62 (-83.15%)
Mutual labels:  draft-js

React Native Draft.js Render

Build Status Coverage Status npm version license

A React Native render for Draft.js model.

Discussion and Support

Join the #react-native-render channel on DraftJS Slack team.

Documentation

Getting Started

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

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

Using

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

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

import getRNDraftJSBlocks from 'react-native-draftjs-render';
import contentState from 'DraftJs/contentState';

const MyApp = () => {
  const blocks = getRNDraftJSBlocks({ contentState });
  return (
    <ScrollView style={{ flex: 1 }}>{blocks}</ScrollView>
  );
};

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

See our sample folder for more details.

Adding custom styles

RNDraftJSRender comes with default styles, but you can use your own:

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

import getRNDraftJSBlocks from 'react-native-draftjs-render';
import contentState from 'DraftJs/contentState';

const styles = StyleSheet.flatten({
  paragraph: {
    color: 'pink',
    fontSize: 18,
  },
  link: {
    color: 'blue',
    fontWeight: 'bold',
  },
});

const MyApp = () => {
  const blocks = getRNDraftJSBlocks({ contentState, customStyles: styles });
  return (
    <ScrollView style={{ flex: 1 }}>{blocks}</ScrollView>
  );
};

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

See more at Custom Styles documentation.

Contributing

To develop using example react-native project:

git clone [email protected]:globocom/react-native-draftjs-render.git
cd react-native-draftjs-render/
make setup

To run tests:

make test

To watch lib changes appearing on Sample App:

make watch

To run sample app in iOS:

make ios

To run sample app in Android:

make android
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].