react-quill
Advanced tools
Comparing version 0.0.3 to 0.0.4
Changelog | ||
========= | ||
v0.0.4 | ||
------ | ||
- Added color toggle to toolbar (@chrismcv) | ||
- Exporting default item sets on `QuillToolbar` | ||
- Fixed `QuillComponent` only accepting a single child. | ||
v0.0.3 | ||
@@ -5,0 +11,0 @@ ------ |
@@ -207,4 +207,4 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
renderContents: function() { | ||
if (React.Children.count(this.props.children) > 0) { | ||
return React.Children.only(this.props.children); | ||
if (React.Children.count(this.props.children)) { | ||
return this.props.children; | ||
} else { | ||
@@ -334,2 +334,17 @@ return [ | ||
var defaultColors = [ | ||
'rgb( 0, 0, 0)', 'rgb(230, 0, 0)', 'rgb(255, 153, 0)', | ||
'rgb(255, 255, 0)', 'rgb( 0, 138, 0)', 'rgb( 0, 102, 204)', | ||
'rgb(153, 51, 255)', 'rgb(255, 255, 255)', 'rgb(250, 204, 204)', | ||
'rgb(255, 235, 204)', 'rgb(255, 255, 204)', 'rgb(204, 232, 204)', | ||
'rgb(204, 224, 245)', 'rgb(235, 214, 255)', 'rgb(187, 187, 187)', | ||
'rgb(240, 102, 102)', 'rgb(255, 194, 102)', 'rgb(255, 255, 102)', | ||
'rgb(102, 185, 102)', 'rgb(102, 163, 224)', 'rgb(194, 133, 255)', | ||
'rgb(136, 136, 136)', 'rgb(161, 0, 0)', 'rgb(178, 107, 0)', | ||
'rgb(178, 178, 0)', 'rgb( 0, 97, 0)', 'rgb( 0, 71, 178)', | ||
'rgb(107, 36, 178)', 'rgb( 68, 68, 68)', 'rgb( 92, 0, 0)', | ||
'rgb(102, 61, 0)', 'rgb(102, 102, 0)', 'rgb( 0, 55, 0)', | ||
'rgb( 0, 41, 102)', 'rgb( 61, 20, 10)', | ||
].map(function(color){ return { value: color } }); | ||
var defaultItems = [ | ||
@@ -357,3 +372,4 @@ | ||
{ type:'underline', label:'Underline' }, | ||
{ type:'link', label:'Link' } | ||
{ type:'link', label:'Link' }, | ||
{ type:'color', label:'Color', items:defaultColors }, | ||
]}, | ||
@@ -417,10 +433,13 @@ | ||
renderItem: function(item) { | ||
var mapping = { | ||
'group': this.renderGroup, | ||
'align': this.renderChoices, | ||
'size': this.renderChoices, | ||
'action': this.renderAction | ||
}; | ||
var renderer = mapping[item.type] || mapping.action; | ||
return renderer(item); | ||
switch (item.type) { | ||
case 'group': | ||
return this.renderGroup(item); | ||
case 'align': | ||
case 'size': | ||
case 'color': | ||
case 'background': | ||
return this.renderChoices(item); | ||
default: | ||
return this.renderAction(item); | ||
} | ||
}, | ||
@@ -442,2 +461,4 @@ | ||
module.exports = QuillToolbar; | ||
QuillToolbar.defaultItems = defaultItems; | ||
QuillToolbar.defaultColors = defaultColors; | ||
@@ -465,3 +486,3 @@ /***/ }, | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCA4ZWFiNjNlYzQ2ODVmN2RmNWMzMiIsIndlYnBhY2s6Ly8vLi9zcmMvaW5kZXguanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL2NvbXBvbmVudC5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvbWl4aW4uanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL3Rvb2xiYXIuanMiLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzXCI6XCJyZWFjdFwiLFwiY29tbW9uanMyXCI6XCJyZWFjdFwiLFwiYW1kXCI6XCJyZWFjdFwiLFwicm9vdFwiOlwiUmVhY3RcIn0iLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzXCI6XCJxdWlsbFwiLFwiY29tbW9uanMyXCI6XCJxdWlsbFwiLFwiYW1kXCI6XCJxdWlsbFwiLFwicm9vdFwiOlwiUXVpbGxcIn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JcIjpcInJlYWN0XCIsXCJhbWRcIjpcInJlYWN0XCIsXCJyb290XCI6XCJSZWFjdFwifVxuICoqIG1vZHVsZSBpZCA9IDRcbiAqKiBtb2R1bGUgY2h1bmtzID0gMFxuICoqLyIsIm1vZHVsZS5leHBvcnRzID0gX19XRUJQQUNLX0VYVEVSTkFMX01PRFVMRV81X187XG5cblxuLyoqKioqKioqKioqKioqKioqXG4gKiogV0VCUEFDSyBGT09URVJcbiAqKiBleHRlcm5hbCB7XCJjb21tb25qc1wiOlwicXVpbGxcIixcImNvbW1vbmpzMlwiOlwicXVpbGxcIixcImFtZFwiOlwicXVpbGxcIixcInJvb3RcIjpcIlF1aWxsXCJ9XG4gKiogbW9kdWxlIGlkID0gNVxuICoqIG1vZHVsZSBjaHVua3MgPSAwXG4gKiovIl0sInNvdXJjZVJvb3QiOiIifQ== |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("quill")):"function"==typeof define&&define.amd?define(["react","quill"],t):"object"==typeof exports?exports.ReactQuill=t(require("react"),require("quill")):e.ReactQuill=t(e.React,e.Quill)}(this,function(e,t){return function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){e.exports=r(4),e.exports.Mixin=r(2),e.exports.Toolbar=r(3)},function(t){t.exports=e},function(e,t,r){"use strict";var o=r(1),n=r(5),i=(o.PropTypes,{createEditor:function(e,t){var r=new n(e,t);return this.hookEditor(r),r},hookEditor:function(e){var t=this;e.on("text-change",function(r,o){t.onEditorChange&&t.onEditorChange(e.getHTML(),r,o)})},updateEditor:function(e,t){return this.destroyEditor(e),this.createEditor(t),e},destroyEditor:function(e){e.destroy()},setEditorContents:function(e,t){var r=e.getSelection();e.setHTML(t),e.setSelection(r)}});e.exports=i},function(e,t,r){"use strict";var o=r(1),n=o.PropTypes,i=[{label:"Formats",type:"group",items:[{label:"Size",type:"size",items:[{label:"Normal",value:""},{label:"Smaller",value:"0.8em"},{label:"Larger",value:"1.4em"},{label:"Huge",value:"2em"}]},{label:"Alignment",type:"align",items:[{label:"Center",value:"center"},{label:"Left",value:"left"},{label:"Right",value:"right"},{label:"Justify",value:"justify"}]}]},{label:"Text",type:"group",items:[{type:"bold",label:"Bold"},{type:"italic",label:"Italic"},{type:"strike",label:"Strike"},{type:"underline",label:"Underline"},{type:"link",label:"Link"}]},{label:"Blocks",type:"group",items:[{type:"bullet",label:"Bullet"},{type:"list",label:"List"}]}],s=o.createClass({displayName:"Quill Toolbar",propTypes:{id:n.string,className:n.string,items:n.array},getDefaultProps:function(){return{items:i}},renderGroup:function(e){return o.DOM.span({key:e.label,className:"ql-format-group"},e.items.map(this.renderItem))},renderChoiceItem:function(e){return o.DOM.option({key:e.label||e.value,value:e.value},e.label)},renderChoices:function(e){return o.DOM.select({key:e.label,className:"ql-"+e.type},e.items.map(this.renderChoiceItem))},renderAction:function(e){return o.DOM.span({key:e.label||e.value,className:"ql-format-button ql-"+e.type,title:e.label})},renderItem:function(e){var t={group:this.renderGroup,align:this.renderChoices,size:this.renderChoices,action:this.renderAction},r=t[e.type]||t.action;return r(e)},getClassName:function(){return"quill-toolbar "+(this.props.className||"")},render:function(){return o.DOM.div({className:this.getClassName()},this.props.items.map(this.renderItem))}});e.exports=s},function(e,t,r){"use strict";var o=r(1),n=r(3),i=r(2),s=o.PropTypes;o.createFactory&&(n=o.createFactory(n));var l=o.createClass({displayName:"Quill",mixins:[i],propTypes:{id:s.string,className:s.string,value:s.string,defaultValue:s.string,readOnly:s.bool,toolbar:s.object,formats:s.array,styles:s.object,theme:s.string,pollInterval:s.number,onChange:s.func},getDefaultProps:function(){return{className:"",theme:"base",modules:{}}},getInitialState:function(){return{}},componentWillReceiveProps:function(e){"value"in e&&e.value!==this.props.value&&this.setEditorContents(this.state.editor,e.value)},componentDidMount:function(){var e=this.createEditor(this.getEditorElement(),this.getEditorConfig());this.setState({editor:e})},componentWillUnmount:function(){this.destroyEditor(this.state.editor)},shouldComponentUpdate:function(){return!1},componentWillUpdate:function(){this.componentWillUnmount()},componentDidUpdate:function(){this.componentDidMount()},getEditorConfig:function(){var e={readOnly:this.props.readOnly,theme:this.props.theme,formats:this.props.formats,styles:this.props.styles,modules:this.props.modules,pollInterval:this.props.pollInterval};return e.modules.toolbar||(e.modules=JSON.parse(JSON.stringify(e.modules)),e.modules.toolbar={container:this.refs.toolbar.getDOMNode()}),e},getEditorElement:function(){return this.refs.editor.getDOMNode()},getEditorContents:function(){return this.props.value||this.props.defaultValue},getClassName:function(){return["quill",this.props.className].join(" ")},renderContents:function(){return o.Children.count(this.props.children)>0?o.Children.only(this.props.children):[n({key:"toolbar",ref:"toolbar",items:this.props.toolbar}),o.DOM.div({key:"editor",ref:"editor",className:"quill-contents",dangerouslySetInnerHTML:{__html:this.getEditorContents()}})]},render:function(){return o.DOM.div({className:this.getClassName(),onChange:this.preventDefault},this.renderContents())},onEditorChange:function(e){e!==this.state.value&&this.props.onChange&&this.props.onChange(e)},preventDefault:function(e){e.preventDefault(),e.stopPropagation()}});e.exports=l},function(e){e.exports=t}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("quill")):"function"==typeof define&&define.amd?define(["react","quill"],t):"object"==typeof exports?exports.ReactQuill=t(require("react"),require("quill")):e.ReactQuill=t(e.React,e.Quill)}(this,function(e,t){return function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){e.exports=r(4),e.exports.Mixin=r(2),e.exports.Toolbar=r(3)},function(t,r,o){t.exports=e},function(e,t,r){"use strict";var o=r(1),n=r(5),i=(o.PropTypes,{createEditor:function(e,t){var r=new n(e,t);return this.hookEditor(r),r},hookEditor:function(e){var t=this;e.on("text-change",function(r,o){t.onEditorChange&&t.onEditorChange(e.getHTML(),r,o)})},updateEditor:function(e,t){return this.destroyEditor(e),this.createEditor(t),e},destroyEditor:function(e){e.destroy()},setEditorContents:function(e,t){var r=e.getSelection();e.setHTML(t),e.setSelection(r)}});e.exports=i},function(e,t,r){"use strict";var o=r(1),n=o.PropTypes,i=["rgb( 0, 0, 0)","rgb(230, 0, 0)","rgb(255, 153, 0)","rgb(255, 255, 0)","rgb( 0, 138, 0)","rgb( 0, 102, 204)","rgb(153, 51, 255)","rgb(255, 255, 255)","rgb(250, 204, 204)","rgb(255, 235, 204)","rgb(255, 255, 204)","rgb(204, 232, 204)","rgb(204, 224, 245)","rgb(235, 214, 255)","rgb(187, 187, 187)","rgb(240, 102, 102)","rgb(255, 194, 102)","rgb(255, 255, 102)","rgb(102, 185, 102)","rgb(102, 163, 224)","rgb(194, 133, 255)","rgb(136, 136, 136)","rgb(161, 0, 0)","rgb(178, 107, 0)","rgb(178, 178, 0)","rgb( 0, 97, 0)","rgb( 0, 71, 178)","rgb(107, 36, 178)","rgb( 68, 68, 68)","rgb( 92, 0, 0)","rgb(102, 61, 0)","rgb(102, 102, 0)","rgb( 0, 55, 0)","rgb( 0, 41, 102)","rgb( 61, 20, 10)"].map(function(e){return{value:e}}),l=[{label:"Formats",type:"group",items:[{label:"Size",type:"size",items:[{label:"Normal",value:""},{label:"Smaller",value:"0.8em"},{label:"Larger",value:"1.4em"},{label:"Huge",value:"2em"}]},{label:"Alignment",type:"align",items:[{label:"Center",value:"center"},{label:"Left",value:"left"},{label:"Right",value:"right"},{label:"Justify",value:"justify"}]}]},{label:"Text",type:"group",items:[{type:"bold",label:"Bold"},{type:"italic",label:"Italic"},{type:"strike",label:"Strike"},{type:"underline",label:"Underline"},{type:"link",label:"Link"},{type:"color",label:"Color",items:i}]},{label:"Blocks",type:"group",items:[{type:"bullet",label:"Bullet"},{type:"list",label:"List"}]}],s=o.createClass({displayName:"Quill Toolbar",propTypes:{id:n.string,className:n.string,items:n.array},getDefaultProps:function(){return{items:l}},renderGroup:function(e){return o.DOM.span({key:e.label,className:"ql-format-group"},e.items.map(this.renderItem))},renderChoiceItem:function(e){return o.DOM.option({key:e.label||e.value,value:e.value},e.label)},renderChoices:function(e){return o.DOM.select({key:e.label,className:"ql-"+e.type},e.items.map(this.renderChoiceItem))},renderAction:function(e){return o.DOM.span({key:e.label||e.value,className:"ql-format-button ql-"+e.type,title:e.label})},renderItem:function(e){switch(e.type){case"group":return this.renderGroup(e);case"align":case"size":case"color":case"background":return this.renderChoices(e);default:return this.renderAction(e)}},getClassName:function(){return"quill-toolbar "+(this.props.className||"")},render:function(){return o.DOM.div({className:this.getClassName()},this.props.items.map(this.renderItem))}});e.exports=s,s.defaultItems=l,s.defaultColors=i},function(e,t,r){"use strict";var o=r(1),n=r(3),i=r(2),l=o.PropTypes;o.createFactory&&(n=o.createFactory(n));var s=o.createClass({displayName:"Quill",mixins:[i],propTypes:{id:l.string,className:l.string,value:l.string,defaultValue:l.string,readOnly:l.bool,toolbar:l.object,formats:l.array,styles:l.object,theme:l.string,pollInterval:l.number,onChange:l.func},getDefaultProps:function(){return{className:"",theme:"base",modules:{}}},getInitialState:function(){return{}},componentWillReceiveProps:function(e){"value"in e&&e.value!==this.props.value&&this.setEditorContents(this.state.editor,e.value)},componentDidMount:function(){var e=this.createEditor(this.getEditorElement(),this.getEditorConfig());this.setState({editor:e})},componentWillUnmount:function(){this.destroyEditor(this.state.editor)},shouldComponentUpdate:function(e,t){return!1},componentWillUpdate:function(){this.componentWillUnmount()},componentDidUpdate:function(){this.componentDidMount()},getEditorConfig:function(){var e={readOnly:this.props.readOnly,theme:this.props.theme,formats:this.props.formats,styles:this.props.styles,modules:this.props.modules,pollInterval:this.props.pollInterval};return e.modules.toolbar||(e.modules=JSON.parse(JSON.stringify(e.modules)),e.modules.toolbar={container:this.refs.toolbar.getDOMNode()}),e},getEditorElement:function(){return this.refs.editor.getDOMNode()},getEditorContents:function(){return this.props.value||this.props.defaultValue},getClassName:function(){return["quill",this.props.className].join(" ")},renderContents:function(){return o.Children.count(this.props.children)?this.props.children:[n({key:"toolbar",ref:"toolbar",items:this.props.toolbar}),o.DOM.div({key:"editor",ref:"editor",className:"quill-contents",dangerouslySetInnerHTML:{__html:this.getEditorContents()}})]},render:function(){return o.DOM.div({className:this.getClassName(),onChange:this.preventDefault},this.renderContents())},onEditorChange:function(e){e!==this.state.value&&this.props.onChange&&this.props.onChange(e)},preventDefault:function(e){e.preventDefault(),e.stopPropagation()}});e.exports=s},function(e,r,o){e.exports=t}])}); |
{ | ||
"name": "react-quill", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "The Quill rich-text editor as a React component.", | ||
@@ -16,3 +16,4 @@ "author": "zenoamaro <zenoamaro@gmail.com>", | ||
}, | ||
"main": "dist/react-quill.js", | ||
"browser": "dist/react-quill.js", | ||
"main": "src/index.js", | ||
"scripts": { | ||
@@ -19,0 +20,0 @@ "test": "make test", |
@@ -132,4 +132,4 @@ 'use strict'; | ||
renderContents: function() { | ||
if (React.Children.count(this.props.children) > 0) { | ||
return React.Children.only(this.props.children); | ||
if (React.Children.count(this.props.children)) { | ||
return this.props.children; | ||
} else { | ||
@@ -136,0 +136,0 @@ return [ |
@@ -6,2 +6,17 @@ 'use strict'; | ||
var defaultColors = [ | ||
'rgb( 0, 0, 0)', 'rgb(230, 0, 0)', 'rgb(255, 153, 0)', | ||
'rgb(255, 255, 0)', 'rgb( 0, 138, 0)', 'rgb( 0, 102, 204)', | ||
'rgb(153, 51, 255)', 'rgb(255, 255, 255)', 'rgb(250, 204, 204)', | ||
'rgb(255, 235, 204)', 'rgb(255, 255, 204)', 'rgb(204, 232, 204)', | ||
'rgb(204, 224, 245)', 'rgb(235, 214, 255)', 'rgb(187, 187, 187)', | ||
'rgb(240, 102, 102)', 'rgb(255, 194, 102)', 'rgb(255, 255, 102)', | ||
'rgb(102, 185, 102)', 'rgb(102, 163, 224)', 'rgb(194, 133, 255)', | ||
'rgb(136, 136, 136)', 'rgb(161, 0, 0)', 'rgb(178, 107, 0)', | ||
'rgb(178, 178, 0)', 'rgb( 0, 97, 0)', 'rgb( 0, 71, 178)', | ||
'rgb(107, 36, 178)', 'rgb( 68, 68, 68)', 'rgb( 92, 0, 0)', | ||
'rgb(102, 61, 0)', 'rgb(102, 102, 0)', 'rgb( 0, 55, 0)', | ||
'rgb( 0, 41, 102)', 'rgb( 61, 20, 10)', | ||
].map(function(color){ return { value: color } }); | ||
var defaultItems = [ | ||
@@ -29,3 +44,4 @@ | ||
{ type:'underline', label:'Underline' }, | ||
{ type:'link', label:'Link' } | ||
{ type:'link', label:'Link' }, | ||
{ type:'color', label:'Color', items:defaultColors }, | ||
]}, | ||
@@ -89,10 +105,13 @@ | ||
renderItem: function(item) { | ||
var mapping = { | ||
'group': this.renderGroup, | ||
'align': this.renderChoices, | ||
'size': this.renderChoices, | ||
'action': this.renderAction | ||
}; | ||
var renderer = mapping[item.type] || mapping.action; | ||
return renderer(item); | ||
switch (item.type) { | ||
case 'group': | ||
return this.renderGroup(item); | ||
case 'align': | ||
case 'size': | ||
case 'color': | ||
case 'background': | ||
return this.renderChoices(item); | ||
default: | ||
return this.renderAction(item); | ||
} | ||
}, | ||
@@ -113,2 +132,4 @@ | ||
module.exports = QuillToolbar; | ||
module.exports = QuillToolbar; | ||
QuillToolbar.defaultItems = defaultItems; | ||
QuillToolbar.defaultColors = defaultColors; |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
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
50232
733
9
1
0