From a424b39cded4e09221b98c7ec456c76902742dd7 Mon Sep 17 00:00:00 2001 From: bigunaleksej Date: Thu, 10 Dec 2015 13:08:09 +0200 Subject: [PATCH] Fixed Invalid Refs --- src/component.js | 4 ++-- src/toolbar.js | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/component.js b/src/component.js index 483e13e9..1fde2d85 100644 --- a/src/component.js +++ b/src/component.js @@ -176,7 +176,7 @@ var QuillComponent = React.createClass({ // because it's shared between components. config.modules = JSON.parse(JSON.stringify(config.modules)); config.modules.toolbar = { - container: this.refs.toolbar.refs.toolbarNode + container: ReactDOM.findDOMNode(this.refs.toolbar) }; } return config; @@ -187,7 +187,7 @@ var QuillComponent = React.createClass({ }, getEditorElement: function() { - return this.refs.editor//.getDOMNode(); + return ReactDOM.findDOMNode(this.refs.editor); }, getEditorContents: function() { diff --git a/src/toolbar.js b/src/toolbar.js index a736586e..8c643d39 100644 --- a/src/toolbar.js +++ b/src/toolbar.js @@ -145,7 +145,6 @@ var QuillToolbar = React.createClass({ var children = this.props.items.map(this.renderItem); var html = children.map(ReactDOMServer.renderToStaticMarkup).join(''); return React.DOM.div({ - ref: 'toolbarNode', className: this.getClassName(), dangerouslySetInnerHTML: { __html:html } });