From b37573cec0aa86af3d29a39c63f66f0151d07384 Mon Sep 17 00:00:00 2001 From: "changbin.wangcb" Date: Fri, 10 Nov 2017 13:34:48 +0800 Subject: [PATCH] config extend --- lib/components/TinyMCE.js | 5 ++++- package.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/components/TinyMCE.js b/lib/components/TinyMCE.js index 3330ac8..46cb444 100644 --- a/lib/components/TinyMCE.js +++ b/lib/components/TinyMCE.js @@ -2,6 +2,7 @@ import React from 'react'; import { findDOMNode } from 'react-dom'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; +import extend from 'lodash/extend'; import isEqual from 'lodash/isEqual'; import clone from 'lodash/clone'; import uuid from '../helpers/uuid'; @@ -102,11 +103,13 @@ const TinyMCE = createReactClass({ ); }, - _init(config, content) { + _init(defaultConfig, content) { if (this._isInit) { this._remove(); } + const config = extend({}, defaultConfig); + // hide the textarea that is me so that no one sees it findDOMNode(this).style.hidden = 'hidden'; diff --git a/package.json b/package.json index a5b4728..505a4bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-tinymce", - "version": "0.7.0", + "version": "0.7.1", "description": "React TinyMCE component", "main": "lib/main.js", "scripts": {