react-quill
Advanced tools
Comparing version 0.2.1 to 0.2.2
Changelog | ||
========= | ||
v0.2.2 | ||
------ | ||
- Added missing `modules` propType and documentation. | ||
- Children are now cloned so ReactQuill can own their refs. Fixes #20. | ||
v0.2.1 | ||
@@ -5,0 +10,0 @@ ------ |
{ | ||
"name": "react-quill", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "The Quill rich-text editor as a React component.", | ||
@@ -5,0 +5,0 @@ "author": "zenoamaro <zenoamaro@gmail.com>", |
@@ -138,2 +138,5 @@ React-Quill ![](https://travis-ci.org/zenoamaro/react-quill.svg?branch=master) | ||
`modules` | ||
: An object specifying what modules are enabled, and their configuration. See the [modules section](http://quilljs.com/docs/modules/) over the Quill documentation for more information on what modules are available. | ||
`toolbar` | ||
@@ -182,2 +185,6 @@ : A list of toolbar items to use as custom configuration for the toolbar. Defaults (that also double as reference) are available as [`ReactQuill.Toolbar.defaultItems`](src/toolbar.js#L21) and [`ReactQuill.Toolbar.defaultColors`](src/toolbar.js#L6). See also the [Toolbar module](http://quilljs.com/docs/modules/toolbar/) over the Quill documentation for more information on the inner workings. | ||
--------- | ||
#### v0.2.2 | ||
- Added missing `modules` propType and documentation. | ||
- Children are now cloned so ReactQuill can own their refs. Fixes #20. | ||
#### v0.2.1 | ||
@@ -193,7 +200,2 @@ - Link toolbar button and module are now enabled by default. Fixes #19. | ||
#### v0.1.1 | ||
- The pre-compiled distributable is not shipped with the NPM package anymore. Should fix [#2](https://github.com/zenoamaro/react-quill/issues/2). | ||
- Sourcemaps are now emitted for both distributables, as separate files. | ||
- Avoiding parsing Quill as it ships with a pre-built main. | ||
[Full changelog](CHANGELOG.md) | ||
@@ -200,0 +202,0 @@ |
@@ -14,2 +14,12 @@ 'use strict'; | ||
// Support React 0.12 and 0.13+ | ||
// FIXME: Remove with React 0.13 | ||
if (React.cloneElement) { | ||
var cloneElement = React.cloneElement; | ||
} else if (React.addons && React.addons.cloneWithProps) { | ||
var cloneElement = React.addons.cloneWithProps; | ||
} else { | ||
throw new Error('React addons are required when using React 0.12 or less.'); | ||
} | ||
var QuillComponent = React.createClass({ | ||
@@ -28,2 +38,3 @@ | ||
readOnly: T.bool, | ||
modules: T.object, | ||
toolbar: T.array, | ||
@@ -44,2 +55,3 @@ formats: T.array, | ||
'className', | ||
'modules', | ||
'toolbar', | ||
@@ -178,3 +190,7 @@ 'formats', | ||
if (React.Children.count(this.props.children)) { | ||
return this.props.children; | ||
// Clone children to own their refs. | ||
return React.Children.map( | ||
this.props.children, | ||
function(c) { return cloneElement(c, { ref: c.ref }) } | ||
); | ||
} else { | ||
@@ -181,0 +197,0 @@ return [ |
/* | ||
React-Quill v0.2.1 | ||
React-Quill v0.2.2 | ||
https://github.com/zenoamaro/react-quill | ||
@@ -4,0 +4,0 @@ */ |
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
22322
412
218