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.3.0 to 2.4.0

3

CHANGELOG.md

@@ -0,1 +1,4 @@

## 2.4.0 (2018-11-02)
* Added `textareaName` prop that sets the name attribute on the textarea for use in forms.
## 2.3.0 (2018-10-01)

@@ -2,0 +5,0 @@ * Added `disabled` prop that sets the editor into readonly mode.

@@ -25,2 +25,3 @@ /// <reference types="react" />

disabled: boolean;
textareaName: string;
}

@@ -27,0 +28,0 @@ export interface IAllProps extends Partial<IProps>, Partial<IEvents> {

4

lib/cjs/components/Editor.js

@@ -64,3 +64,3 @@ "use strict";

}
else if (this.element) {
else if (this.element && this.element.ownerDocument) {
var doc = this.element.ownerDocument;

@@ -115,3 +115,3 @@ var channel = this.props.cloudChannel ? this.props.cloudChannel : 'stable';

var _this = this;
return React.createElement("textarea", { ref: function (elm) { return (_this.element = elm); }, style: { visibility: 'hidden' }, id: this.id });
return React.createElement("textarea", { ref: function (elm) { return (_this.element = elm); }, style: { visibility: 'hidden' }, id: this.id, name: this.props.textareaName });
};

@@ -118,0 +118,0 @@ Editor.propTypes = EditorPropTypes_1.EditorPropTypes;

@@ -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]), disabled: PropTypes.bool }, 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, textareaName: PropTypes.string }, exports.eventPropTypes);

@@ -17,3 +17,5 @@ "use strict";

scriptTag.src = url;
doc.head.appendChild(scriptTag);
if (doc.head) {
doc.head.appendChild(scriptTag);
}
};

@@ -20,0 +22,0 @@ exports.create = function () {

@@ -25,2 +25,3 @@ /// <reference types="react" />

disabled: boolean;
textareaName: string;
}

@@ -27,0 +28,0 @@ export interface IAllProps extends Partial<IProps>, Partial<IEvents> {

@@ -62,3 +62,3 @@ /**

}
else if (this.element) {
else if (this.element && this.element.ownerDocument) {
var doc = this.element.ownerDocument;

@@ -113,3 +113,3 @@ var channel = this.props.cloudChannel ? this.props.cloudChannel : 'stable';

var _this = this;
return React.createElement("textarea", { ref: function (elm) { return (_this.element = elm); }, style: { visibility: 'hidden' }, id: this.id });
return React.createElement("textarea", { ref: function (elm) { return (_this.element = elm); }, style: { visibility: 'hidden' }, id: this.id, name: this.props.textareaName });
};

@@ -116,0 +116,0 @@ Editor.propTypes = EditorPropTypes;

@@ -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]), disabled: PropTypes.bool }, 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, textareaName: PropTypes.string }, eventPropTypes);

@@ -15,3 +15,5 @@ /**

scriptTag.src = url;
doc.head.appendChild(scriptTag);
if (doc.head) {
doc.head.appendChild(scriptTag);
}
};

@@ -18,0 +20,0 @@ export var create = function () {

{
"name": "@tinymce/tinymce-react",
"version": "2.3.0",
"version": "2.4.0",
"description": "Official TinyMCE React Component",

@@ -5,0 +5,0 @@ "repository": {

@@ -41,2 +41,3 @@ # Official TinyMCE React component

The editor accepts the following props:
* `disabled`: Using this prop that takes a boolean value you can dynamically set the editor into a "disabled" readonly mode or into the normal editable mode.
* `id`: An id for the editor so you can later grab the instance by using the `tinymce.get('ID')` method on tinymce, defaults to an automatically generated uuid.

@@ -51,2 +52,3 @@ * `init`: Object sent to the `tinymce.init` method used to initialize the editor.

* `cloudChannel`: Cloud channel for TinyMCE Cloud, more info below.
* `textareaName`: Sets the name attribute on the textarea that the editor is initialised on for use in forms.

@@ -53,0 +55,0 @@ None of the configuration props are **required** for the component to work - other than if you are using TinyMCE Cloud you will have to specify the `apiKey` to get rid of the `This domain is not registered...` warning message.

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