react-native-webview-quilljs
Quill-js package for apps that need a non-native rich text editor
Last updated 8 months ago by reggie3 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install react-native-webview-quilljs 
SYNC missed versions from official npm registry.

React Native Webview Quilljs

Quill.js editor and viewer components with no native code for React Native apps built using Expo.

npm npm npm npm

Image

Try it in Expo

QR Code

Link to Expo Project Page

Installation

npm install --save react-native-webview-quilljs

or

yarn add react-native-webview-quilljs

and then

import {WebViewQuillEditor, WebViewQuillViewer} from 'react-native-webview-quilljs'

Usage

This package can be used to create both an editor and a viewer

Creating a Quill.js editor with the standard toolbar:

 <WebViewQuillEditor
    ref={component => (this.webViewQuillEditor = component)}
    getDeltaCallback={this.getDeltaCallback}
    contentToDisplay={contentToDisplay}
    onLoad={this.onLoadCallback}
  />

This component accepts the following props:

Name Required Description
ref yes A reference to the editor component to be used to retrieve its contents using this.webViewQuillEditor.getDelta();
getDeltaCallback no Function called in response to a call to this.webViewQuillEditor.getDelta(). It will receive a Delta object containing the contents of editor
contentToDisplay no A Quill delta that will be displayed by the editor when it loads. A deltas is an array describing the content and formatting of the message. See delta details here
onLoad no A function called when the Editor finishes loading
onDeltaChangeCallback no Function called when the contents of Quill editor have changed. The function receives a delta containing the following arguments:
deltaChange   // changes to the delta
delta         // delta contents as received by getContents() mothod
deltaOld      // the previous contents of the editor
changeSource  // source of change (user, api, etc.)

Further information on what is returned is described in the Quill.js API documentation | | backgroundColor| no | String that equates to a valid CSS color value that the background of the editor will be set to| |getEditorCallback| no | A function that will receive the Quill.js editor as an arguement |

Creating a Delta viewer that can display content created with Quill.js:

<WebViewQuillViewer
    ref={component => (this.webViewQuillViewer = component)}
    contentToDisplay={this.state.messageDelta}
    onLoad={this.onLoadCallback}
  />

This component accepts the following props:

Name Required Description
ref yes A reference to the editor component to be used to update its contents using this.webViewQuillViewer.sendContentToViewer(delta);
contentToDisplay no A Quill delta that will be displayed by the viewer when it loads. A deltas is an array describing the content and formatting of the message. See delta details here
onLoad no A function called when the Editor finishes loading
backgroundColor no String that equates to a valid CSS color value that the background of the viewer will be set to
getViewerCallback no A function that will receive the Quill.js viewer as an argument

Changelog

0.9.0

  • Replace Expo dependency with expo-asset-utils

0.8.3

  • Updated onChangeCallback to receive the changes, contents, and previous contents of the delta

0.8.0

  • Removes the propType specification for contentToDisplay to address issue #19

0.6.5

  • Added initial testing framework

0.6.0

  • Removed requirement to download JavaScript files from GitHub in order for the package to work. JavaScript files are now inline with the HTML which enables the package to work without an Internet connection.

  • Added getViewerCallback and getEditorCallback

0.4.4

  • Changed HTTP path for files to be downloaded in preparation for potential inline JS bundling or Expo Packager bundling of files.

0.4.0

  • Added "backgroundColor" props for both the WebViewQuillViewer and WebViewQuillEditor

0.3.20

  • Added copy and paste of HTML

0.3.10

  • Revert file access features from 0.3.0.

0.3.0

  • Library no longer relies on accessing WebView files from the Internet. All files needed by both the Editor and Viewer are included with the packages.
  • Fonts display correctly on iOS devices

0.2.5

  • Added onDeltaChangeCallback property to Editor

LICENSE

MIT

Current Tags

  • 0.3.19                                ...           alpha (2 years ago)
  • 0.8.37                                ...           beta (a year ago)
  • 0.8.22                                ...           issue-21 (2 years ago)
  • 0.8.23                                ...           issue21 (2 years ago)
  • 0.8.41                                ...           latest (8 months ago)
  • 0.3.17                                ...           send-content-fix (2 years ago)

115 Versions

  • 0.8.41                                ...           8 months ago
  • 0.8.40                                ...           8 months ago
  • 0.8.39                                ...           8 months ago
  • 0.8.38                                ...           a year ago
  • 0.8.37                                ...           a year ago
  • 0.8.36                                ...           a year ago
  • 0.8.35                                ...           a year ago
  • 0.8.34                                ...           2 years ago
  • 0.8.33                                ...           2 years ago
  • 0.8.32                                ...           2 years ago
  • 0.8.25                                ...           2 years ago
  • 0.8.24                                ...           2 years ago
  • 0.8.23                                ...           2 years ago
  • 0.8.22                                ...           2 years ago
  • 0.8.21                                ...           2 years ago
  • 0.8.2                                ...           2 years ago
  • 0.8.1                                ...           2 years ago
  • 0.7.11                                ...           2 years ago
  • 0.6.10                                ...           2 years ago
  • 0.6.9                                ...           2 years ago
  • 0.6.8                                ...           2 years ago
  • 0.6.7                                ...           2 years ago
  • 0.6.6                                ...           2 years ago
  • 0.6.18                                ...           2 years ago
  • 0.6.17                                ...           2 years ago
  • 0.6.16                                ...           2 years ago
  • 0.6.15                                ...           2 years ago
  • 0.6.14                                ...           2 years ago
  • 0.6.13                                ...           2 years ago
  • 0.6.12                                ...           2 years ago
  • 0.6.11                                ...           2 years ago
  • 0.6.1                                ...           2 years ago
  • 0.6.0                                ...           2 years ago
  • 0.5.9                                ...           2 years ago
  • 0.5.8                                ...           2 years ago
  • 0.5.7                                ...           2 years ago
  • 0.5.6                                ...           2 years ago
  • 0.5.5                                ...           2 years ago
  • 0.5.4                                ...           2 years ago
  • 0.5.3                                ...           2 years ago
  • 0.5.2                                ...           2 years ago
  • 0.4.4                                ...           2 years ago
  • 0.4.3                                ...           2 years ago
  • 0.4.2                                ...           2 years ago
  • 0.4.1                                ...           2 years ago
  • 0.3.22                                ...           2 years ago
  • 0.3.21                                ...           2 years ago
  • 0.3.20                                ...           2 years ago
  • 0.3.19                                ...           2 years ago
  • 0.3.18                                ...           2 years ago
  • 0.3.17                                ...           2 years ago
  • 0.3.16                                ...           2 years ago
  • 0.3.15                                ...           2 years ago
  • 0.3.13                                ...           2 years ago
  • 0.3.11                                ...           2 years ago
  • 0.3.12                                ...           2 years ago
  • 0.3.10                                ...           2 years ago
  • 0.3.9                                ...           2 years ago
  • 0.3.8                                ...           2 years ago
  • 0.3.7                                ...           2 years ago
  • 0.3.5                                ...           2 years ago
  • 0.3.4                                ...           2 years ago
  • 0.3.3                                ...           2 years ago
  • 0.3.2                                ...           2 years ago
  • 0.3.1                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.5                                ...           2 years ago
  • 0.2.4                                ...           2 years ago
  • 0.2.3                                ...           2 years ago
  • 0.2.2                                ...           2 years ago
  • 0.1.45                                ...           2 years ago
  • 0.1.44                                ...           2 years ago
  • 0.1.43                                ...           2 years ago
  • 0.1.42                                ...           2 years ago
  • 0.1.41                                ...           2 years ago
  • 0.1.40                                ...           2 years ago
  • 0.1.39                                ...           2 years ago
  • 0.1.38                                ...           2 years ago
  • 0.1.37                                ...           2 years ago
  • 0.1.36                                ...           2 years ago
  • 0.1.3                                ...           2 years ago
  • 0.1.34                                ...           2 years ago
  • 0.1.258                                ...           2 years ago
  • 0.1.257                                ...           2 years ago
  • 0.1.256                                ...           2 years ago
  • 0.1.255                                ...           2 years ago
  • 0.1.254                                ...           2 years ago
  • 0.1.253                                ...           2 years ago
  • 0.1.252                                ...           2 years ago
  • 0.1.251                                ...           2 years ago
  • 0.1.250                                ...           2 years ago
  • 0.1.249                                ...           2 years ago
  • 0.1.248                                ...           2 years ago
  • 0.1.247                                ...           2 years ago
  • 0.1.246                                ...           2 years ago
  • 0.1.244                                ...           2 years ago
  • 0.1.243                                ...           2 years ago
  • 0.1.242                                ...           2 years ago
  • 0.1.241                                ...           2 years ago
  • 0.1.24                                ...           2 years ago
  • 0.1.23                                ...           2 years ago
  • 0.1.22                                ...           2 years ago
  • 0.1.21                                ...           2 years ago
  • 0.1.20                                ...           2 years ago
  • 0.1.12                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
  • 0.0.16                                ...           2 years ago
  • 0.0.15                                ...           2 years ago
  • 0.0.14                                ...           2 years ago
  • 0.0.13                                ...           2 years ago
  • 0.0.12                                ...           2 years ago
  • 0.0.111                                ...           2 years ago
  • 0.0.11                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 2
Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |