@tinymce/tinymce-react
Advanced tools
Comparing version 2.2.6 to 2.3.0
@@ -0,1 +1,4 @@ | ||
## 2.3.0 (2018-10-01) | ||
* Added `disabled` prop that sets the editor into readonly mode. | ||
## 2.2.6 (2018-09-03) | ||
@@ -2,0 +5,0 @@ * Fixed broken links in readme. |
@@ -24,2 +24,3 @@ /// <reference types="react" /> | ||
toolbar: string | string[]; | ||
disabled: boolean; | ||
} | ||
@@ -26,0 +27,0 @@ export interface IAllProps extends Partial<IProps>, Partial<IEvents> { |
@@ -40,3 +40,3 @@ "use strict"; | ||
_this.initialise = function () { | ||
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) { | ||
var finalInit = __assign({}, _this.props.init, { target: _this.element, readonly: _this.props.disabled, 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; | ||
@@ -83,2 +83,5 @@ editor.on('init', function (e) { | ||
} | ||
if (typeof nextProps.disabled === 'boolean' && nextProps.disabled !== this.props.disabled) { | ||
this.editor.setMode(nextProps.disabled ? 'readonly' : 'design'); | ||
} | ||
} | ||
@@ -85,0 +88,0 @@ }; |
@@ -83,2 +83,2 @@ "use strict"; | ||
}; | ||
exports.EditorPropTypes = __assign({ apiKey: PropTypes.string, id: PropTypes.string, inline: PropTypes.bool, init: PropTypes.object, initialValue: PropTypes.string, onEditorChange: PropTypes.func, value: PropTypes.string, tagName: PropTypes.string, cloudChannel: PropTypes.oneOf(['stable', 'dev', 'testing']), plugins: PropTypes.oneOfType([PropTypes.string, PropTypes.array]), toolbar: PropTypes.oneOfType([PropTypes.string, PropTypes.array]) }, exports.eventPropTypes); | ||
exports.EditorPropTypes = __assign({ apiKey: PropTypes.string, id: PropTypes.string, inline: PropTypes.bool, init: PropTypes.object, initialValue: PropTypes.string, onEditorChange: PropTypes.func, value: PropTypes.string, tagName: PropTypes.string, cloudChannel: PropTypes.oneOf(['stable', 'dev', 'testing']), plugins: PropTypes.oneOfType([PropTypes.string, PropTypes.array]), toolbar: PropTypes.oneOfType([PropTypes.string, PropTypes.array]), disabled: PropTypes.bool }, exports.eventPropTypes); |
@@ -24,2 +24,3 @@ /// <reference types="react" /> | ||
toolbar: string | string[]; | ||
disabled: boolean; | ||
} | ||
@@ -26,0 +27,0 @@ export interface IAllProps extends Partial<IProps>, Partial<IEvents> { |
@@ -38,3 +38,3 @@ /** | ||
_this.initialise = function () { | ||
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) { | ||
var finalInit = __assign({}, _this.props.init, { target: _this.element, readonly: _this.props.disabled, 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; | ||
@@ -81,2 +81,5 @@ editor.on('init', function (e) { | ||
} | ||
if (typeof nextProps.disabled === 'boolean' && nextProps.disabled !== this.props.disabled) { | ||
this.editor.setMode(nextProps.disabled ? 'readonly' : 'design'); | ||
} | ||
} | ||
@@ -83,0 +86,0 @@ }; |
@@ -81,2 +81,2 @@ /** | ||
}; | ||
export var EditorPropTypes = __assign({ apiKey: PropTypes.string, id: PropTypes.string, inline: PropTypes.bool, init: PropTypes.object, initialValue: PropTypes.string, onEditorChange: PropTypes.func, value: PropTypes.string, tagName: PropTypes.string, cloudChannel: PropTypes.oneOf(['stable', 'dev', 'testing']), plugins: PropTypes.oneOfType([PropTypes.string, PropTypes.array]), toolbar: PropTypes.oneOfType([PropTypes.string, PropTypes.array]) }, eventPropTypes); | ||
export var EditorPropTypes = __assign({ apiKey: PropTypes.string, id: PropTypes.string, inline: PropTypes.bool, init: PropTypes.object, initialValue: PropTypes.string, onEditorChange: PropTypes.func, value: PropTypes.string, tagName: PropTypes.string, cloudChannel: PropTypes.oneOf(['stable', 'dev', 'testing']), plugins: PropTypes.oneOfType([PropTypes.string, PropTypes.array]), toolbar: PropTypes.oneOfType([PropTypes.string, PropTypes.array]), disabled: PropTypes.bool }, eventPropTypes); |
{ | ||
"name": "@tinymce/tinymce-react", | ||
"version": "2.2.6", | ||
"version": "2.3.0", | ||
"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
52443
1092