Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tinymce/tinymce-react

Package Overview
Dependencies
Maintainers
1
Versions
365
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinymce/tinymce-react - npm Package Compare versions

Comparing version 2.2.6 to 2.3.0

3

CHANGELOG.md

@@ -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> {

5

lib/cjs/components/Editor.js

@@ -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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc