shivankdaytion / react-native-quill-editor

React Native Quill Rich Text Editor Wrapper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

React Native Quill Rich Text Editor Wrapper

License:MIT License


Languages

Language:HTML 96.9%Language:Java 1.2%Language:Objective-C 1.0%Language:TypeScript 0.5%Language:JavaScript 0.2%Language:Ruby 0.1%Language:Starlark 0.1%