react-quill
Advanced tools
Comparing version 1.2.7 to 1.3.0
Changelog | ||
========= | ||
v1.3.0 | ||
------ | ||
- Add scrollingContainer prop | ||
- Fix Typescript exports | ||
- Fix tabindex prop | ||
v1.2.6 | ||
@@ -5,0 +12,0 @@ ------ |
@@ -275,2 +275,4 @@ 'use strict'; | ||
readOnly: this.props.readOnly, | ||
scrollingContainer: this.props.scrollingContainer, | ||
tabIndex: this.props.tabIndex, | ||
theme: this.props.theme, | ||
@@ -277,0 +279,0 @@ }; |
@@ -13,2 +13,5 @@ 'use strict'; | ||
var editor = new Quill($el, config); | ||
if (config.tabIndex !== undefined) { | ||
this.setEditorTabIndex(editor, config.tabIndex); | ||
} | ||
this.hookEditor(editor); | ||
@@ -87,2 +90,8 @@ return editor; | ||
setEditorTabIndex: function(editor, tabIndex) { | ||
if (editor.editor && editor.editor.scroll && editor.editor.scroll.domNode) { | ||
editor.editor.scroll.domNode.tabIndex = tabIndex; | ||
} | ||
}, | ||
/* | ||
@@ -89,0 +98,0 @@ Returns an weaker, unprivileged proxy object that only |
{ | ||
"name": "react-quill", | ||
"version": "1.2.7", | ||
"version": "1.3.0", | ||
"description": "The Quill rich-text editor as a React component.", | ||
@@ -5,0 +5,0 @@ "author": "zenoamaro <zenoamaro@gmail.com>", |
@@ -64,4 +64,5 @@ React-Quill [![Build Status](https://travis-ci.org/zenoamaro/react-quill.svg?branch=master)](https://travis-ci.org/zenoamaro/react-quill) [![npm](https://img.shields.io/npm/v/react-quill.svg)](https://www.npmjs.com/package/react-quill) | ||
```jsx | ||
import ReactQuill from 'react-quill'; // ES6 | ||
import * as ReactQuill from 'react-quill'; // Typescript | ||
const ReactQuill = require('react-quill'); // CommonJS | ||
import ReactQuill from 'react-quill'; // ES6 | ||
``` | ||
@@ -375,2 +376,4 @@ | ||
Note: Custom editing areas lose focus when using React 16 as a peer dep at this time ([bug](https://github.com/zenoamaro/react-quill/issues/309)). | ||
<details> | ||
@@ -574,3 +577,3 @@ | ||
`placeholder` | ||
: The default value for the empty editor. | ||
: The default value for the empty editor. Note: The Quill API does not support changing this value dynamically. Use refs and data-attributes instead (see [#340](https://github.com/zenoamaro/react-quill/issues/340#issuecomment-376176878)). | ||
@@ -684,2 +687,19 @@ `modules` | ||
`makeUnprivilegedEditor` | ||
: Creates an [unprivileged editor](#unprivileged-editor). Pass this method a reference to the Quill instance from `getEditor`. Normally you do not need to use this method since the editor exposed to event handlers is already unprivileged. | ||
<details> | ||
<summary>Example</summary> | ||
```jsx | ||
const editor = this.reactQuillRef.getEditor(); | ||
const unprivilegedEditor = this.reactQuillRef.makeUnprivilegedEditor(editor); | ||
// You may now use the unprivilegedEditor proxy methods | ||
unprivilegedEditor.getText(); | ||
``` | ||
</details> | ||
### The unprivileged editor | ||
@@ -707,3 +727,2 @@ | ||
## Building and testing | ||
@@ -710,0 +729,0 @@ |
@@ -88,3 +88,3 @@ import * as React from "react"; | ||
declare class ReactQuill extends React.Component<ReactQuill.ComponentProps> { | ||
export default class ReactQuill extends React.Component<ReactQuill.ComponentProps> { | ||
focus(): void; | ||
@@ -95,2 +95,2 @@ blur(): void; | ||
export = ReactQuill; | ||
export { Quill } from "quill"; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19826
826
3394759
16