@tinymce/tinymce-react
Advanced tools
Comparing version 2.2.1 to 2.2.2
@@ -0,1 +1,4 @@ | ||
## 2.2.1 (2018-04-03) | ||
* No change, pushed to fix missing readme on npm. | ||
## 2.2.0 (2018-02-19) | ||
@@ -2,0 +5,0 @@ * Added functionality so you can use the editor as a controlled component by setting the `value` property and using the `onEditorChange` event. |
@@ -43,5 +43,5 @@ /// <reference types="react" /> | ||
private initialise; | ||
private initEditor(editor, initialValue); | ||
private initEditor(editor); | ||
private renderInline(); | ||
private renderIframe(); | ||
} |
@@ -40,7 +40,6 @@ "use strict"; | ||
_this.initialise = function () { | ||
var initialValue = typeof _this.props.value === 'string' ? _this.props.value : typeof _this.props.initialValue === 'string' ? _this.props.initialValue : ''; | ||
var finalInit = __assign({}, _this.props.init, { target: _this.element, inline: _this.inline, plugins: Utils_1.mergePlugins(_this.props.init && _this.props.init.plugins, _this.props.plugins), toolbar: _this.props.toolbar || (_this.props.init && _this.props.init.toolbar), setup: function (editor) { | ||
_this.editor = editor; | ||
editor.on('init', function () { | ||
_this.initEditor(editor, initialValue); | ||
_this.initEditor(editor); | ||
}); | ||
@@ -87,5 +86,6 @@ if (_this.props.init && typeof _this.props.init.setup === 'function') { | ||
}; | ||
Editor.prototype.initEditor = function (editor, initialValue) { | ||
Editor.prototype.initEditor = function (editor) { | ||
var _this = this; | ||
editor.setContent(initialValue); | ||
var value = typeof this.props.value === 'string' ? this.props.value : typeof this.props.initialValue === 'string' ? this.props.initialValue : ''; | ||
editor.setContent(value); | ||
if (Utils_1.isFunction(this.props.onEditorChange)) { | ||
@@ -92,0 +92,0 @@ editor.on('change keyup setcontent', function (e) { |
@@ -43,5 +43,5 @@ /// <reference types="react" /> | ||
private initialise; | ||
private initEditor(editor, initialValue); | ||
private initEditor(editor); | ||
private renderInline(); | ||
private renderIframe(); | ||
} |
@@ -38,7 +38,6 @@ /** | ||
_this.initialise = function () { | ||
var initialValue = typeof _this.props.value === 'string' ? _this.props.value : typeof _this.props.initialValue === 'string' ? _this.props.initialValue : ''; | ||
var finalInit = __assign({}, _this.props.init, { target: _this.element, inline: _this.inline, plugins: mergePlugins(_this.props.init && _this.props.init.plugins, _this.props.plugins), toolbar: _this.props.toolbar || (_this.props.init && _this.props.init.toolbar), setup: function (editor) { | ||
_this.editor = editor; | ||
editor.on('init', function () { | ||
_this.initEditor(editor, initialValue); | ||
_this.initEditor(editor); | ||
}); | ||
@@ -85,5 +84,6 @@ if (_this.props.init && typeof _this.props.init.setup === 'function') { | ||
}; | ||
Editor.prototype.initEditor = function (editor, initialValue) { | ||
Editor.prototype.initEditor = function (editor) { | ||
var _this = this; | ||
editor.setContent(initialValue); | ||
var value = typeof this.props.value === 'string' ? this.props.value : typeof this.props.initialValue === 'string' ? this.props.initialValue : ''; | ||
editor.setContent(value); | ||
if (isFunction(this.props.onEditorChange)) { | ||
@@ -90,0 +90,0 @@ editor.on('change keyup setcontent', function (e) { |
{ | ||
"name": "@tinymce/tinymce-react", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Official TinyMCE React Component", | ||
@@ -5,0 +5,0 @@ "repository": { |
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
50879