No Description

index.ios.js 787B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import React, { Component } from 'react';
  2. import {
  3. AppRegistry,
  4. StyleSheet,
  5. Text,
  6. View
  7. } from 'react-native';
  8. import RichTextEditor from 'react-native-ZSSRichTextEditor'
  9. class RichTextExample extends Component {
  10. render() {
  11. return (
  12. <View style={styles.container}>
  13. <RichTextEditor
  14. style={styles.richText}
  15. initialHTML={'Hello <b>World</b> <p>this is a new paragraph</p>'}
  16. />
  17. </View>
  18. );
  19. }
  20. }
  21. const styles = StyleSheet.create({
  22. container: {
  23. flex: 1,
  24. flexDirection: 'column',
  25. backgroundColor: '#F5FCFF',
  26. paddingTop: 40
  27. },
  28. richText: {
  29. alignItems:'center',
  30. justifyContent: 'center',
  31. backgroundColor: 'transparent',
  32. },
  33. });
  34. AppRegistry.registerComponent('example', () => RichTextExample);