Code Monkey home page Code Monkey logo

react-native-quill-editor's Introduction

react-native-quill-editor

诞生记:https://juejin.cn/post/6867945949788897288

React Native Quill Rich Text Editor Wrapper

Screenshots

Install

$ yarn add react-native-quill-editor

Make sure you installed react-native-webview

Usage

import QuillEditor from 'react-native-quill-editor'

const App = () => {
  const onChange = (html: string) => {
    console.log(html)
  }
  return 
    <QuillEditor
      style={{ height: 300 }}
      options={{
        placeholder: '请赋诗一首...',
      }}
      onChange={onChange}
   />
  
}

Props

Name Type Default Description
defaultValue string "" Default Vaule(any valid html string)
options object {placeholder: '请输入...',modules: {toolbar: [[{ header: [1, 2, false] }], ['bold', 'italic', 'underline'], ['image', 'code-block']]}} quill options
style ViewStyle {} container style
onChange (html: string) => void onChange: () => {} onChange Event

react-native-quill-editor's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-native-quill-editor's Issues

React Native Quill Editor not working

I have wrote the following code

`import React from 'react';
import QuillEditor from 'react-native-quill-editor';

const Quill = () => {
const onChange = (html) => {
console.log(html)
}
return <QuillEditor style={{ height: 300 }} placeholder="drxfgwrstedhgrstd" onChange={onChange} />
}

export default Quill;`

and it returns an error, which is preventing my app to load. And also this component.

Screenshot from 2021-01-03 22-26-03

Cannot build the app

Hi,
I got an error when building the app:

[Tue Jan 26 2021 15:14:46.970] ERROR Invariant Violation: Tried to register two views with the same name RNCWebView [Tue Jan 26 2021 15:14:46.971] ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication) [Tue Jan 26 2021 15:14:48.600] ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)

I found react-native-webview in the main node_modules, however I also found it in the child node_modules under react-native-quill-editor module:

/node_modules/react-native-webview (image 1)
/node_modules/react-native-quill-editor/node_modules/react-native-webview (image 2)

Imgur
Imgur

I see "react-native-webview" again in the react-native-quill-editor node_modules folder!??

Imgur

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.