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.1.3 to 2.1.4

3

CHANGELOG.md

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

## 2.1.4 (2018-02-16)
* Fixed bug where is wasn't possible to set inline in the init object, only on the shorthand.
## 2.1.3 (2018-01-17)

@@ -2,0 +5,0 @@ * Added `plugins` and `toolbar` shorthands.

3

lib/cjs/components/Editor.d.ts

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

initialValue: string;
init: any;
init: Record<string, any>;
tagName: string;

@@ -24,2 +24,3 @@ cloudChannel: string;

private editor;
private inline;
componentWillMount(): void;

@@ -26,0 +27,0 @@ componentDidMount(): void;

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

var initialValue = typeof _this.props.initialValue === 'string' ? _this.props.initialValue : '';
var finalInit = __assign({}, _this.props.init, { target: _this.element, inline: _this.props.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, 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;

@@ -59,2 +59,3 @@ editor.on('init', function () { return editor.setContent(initialValue); });

this.id = this.id || this.props.id || Utils_1.uuid('tiny-react');
this.inline = this.props.inline ? this.props.inline : this.props.init && this.props.init.inline;
};

@@ -76,3 +77,3 @@ Editor.prototype.componentDidMount = function () {

Editor.prototype.render = function () {
return this.props.inline ? this.renderInline() : this.renderIframe();
return this.inline ? this.renderInline() : this.renderIframe();
};

@@ -83,3 +84,3 @@ Editor.prototype.renderInline = function () {

return React.createElement(tagName, {
ref: function (elm) { return _this.element = elm; },
ref: function (elm) { return (_this.element = elm); },
id: this.id

@@ -90,5 +91,3 @@ });

var _this = this;
return (React.createElement("textarea", { ref: function (elm) {
_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 });
};

@@ -95,0 +94,0 @@ Editor.prototype.cleanUp = function () {

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

Object.defineProperty(exports, "__esModule", { value: true });
var getGlobal = function () { return typeof window !== 'undefined' ? window : global; };
var getGlobal = function () { return (typeof window !== 'undefined' ? window : global); };
var getTinymce = function () {

@@ -13,0 +13,0 @@ var global = getGlobal();

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

initialValue: string;
init: any;
init: Record<string, any>;
tagName: string;

@@ -24,2 +24,3 @@ cloudChannel: string;

private editor;
private inline;
componentWillMount(): void;

@@ -26,0 +27,0 @@ componentDidMount(): void;

@@ -39,3 +39,3 @@ /**

var initialValue = typeof _this.props.initialValue === 'string' ? _this.props.initialValue : '';
var finalInit = __assign({}, _this.props.init, { target: _this.element, inline: _this.props.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, 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;

@@ -57,2 +57,3 @@ editor.on('init', function () { return editor.setContent(initialValue); });

this.id = this.id || this.props.id || uuid('tiny-react');
this.inline = this.props.inline ? this.props.inline : this.props.init && this.props.init.inline;
};

@@ -74,3 +75,3 @@ Editor.prototype.componentDidMount = function () {

Editor.prototype.render = function () {
return this.props.inline ? this.renderInline() : this.renderIframe();
return this.inline ? this.renderInline() : this.renderIframe();
};

@@ -81,3 +82,3 @@ Editor.prototype.renderInline = function () {

return React.createElement(tagName, {
ref: function (elm) { return _this.element = elm; },
ref: function (elm) { return (_this.element = elm); },
id: this.id

@@ -88,5 +89,3 @@ });

var _this = this;
return (React.createElement("textarea", { ref: function (elm) {
_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 });
};

@@ -93,0 +92,0 @@ Editor.prototype.cleanUp = function () {

@@ -8,3 +8,3 @@ /**

*/
var getGlobal = function () { return typeof window !== 'undefined' ? window : global; };
var getGlobal = function () { return (typeof window !== 'undefined' ? window : global); };
var getTinymce = function () {

@@ -11,0 +11,0 @@ var global = getGlobal();

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

@@ -17,3 +17,3 @@ "repository": {

"scripts": {
"lint": "tslint src/**/*.tsx",
"lint": "tslint 'src/**/*.ts?(x)'",
"clean": "rimraf lib",

@@ -67,2 +67,3 @@ "test": "jest",

"jest": "^22.0.4",
"prettier": "^1.10.2",
"raf": "^3.4.0",

@@ -73,2 +74,4 @@ "rimraf": "^2.6.2",

"tslint": "^5.8.0",
"tslint-config-prettier": "^1.7.0",
"tslint-plugin-prettier": "^1.3.0",
"typescript": "^2.6.2",

@@ -75,0 +78,0 @@ "webpack": "^3.10.0"

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