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.0.2 to 2.0.3

9

CHANGELOG.md

@@ -0,1 +1,10 @@

## 2.0.3 (2017-11-22)
* Added check for `initialValue` prop to prevent javascript error that was shown when `tinymce.setContent` was called with undefined.
## 2.0.2 (2017-11-22)
* Accidentally published 2.0.1 without building first, published this version to fix that and added prepare hook to prevent the same thing from happening again.
## 2.0.1 (2017-11-21)
* Added description to package.json and improved readme wording.
## 2.0.0 (2017-11-08)

@@ -2,0 +11,0 @@ * *BREAKING!* Switched `value` prop to `initialValue` to make it clearer what it actually does.

7

lib/cjs/components/Editor.js

@@ -44,10 +44,7 @@ "use strict";

var _this = this;
var setupCallback = this.props.init;
var initialValue = typeof this.props.initialValue === 'string' ? this.props.initialValue : '';
var finalInit = __assign({}, this.props.init, { selector: "#" + this.id, inline: this.props.inline, setup: function (editor) {
_this.editor = editor;
editor.on('init', function () { return editor.setContent(_this.props.initialValue); });
editor.on('init', function () { return editor.setContent(initialValue); });
Utils_1.bindHandlers(_this.props, editor);
if (typeof setupCallback === 'function') {
setupCallback(editor);
}
} });

@@ -54,0 +51,0 @@ if (Utils_1.isTextarea(this.element)) {

@@ -42,10 +42,7 @@ /**

var _this = this;
var setupCallback = this.props.init;
var initialValue = typeof this.props.initialValue === 'string' ? this.props.initialValue : '';
var finalInit = __assign({}, this.props.init, { selector: "#" + this.id, inline: this.props.inline, setup: function (editor) {
_this.editor = editor;
editor.on('init', function () { return editor.setContent(_this.props.initialValue); });
editor.on('init', function () { return editor.setContent(initialValue); });
bindHandlers(_this.props, editor);
if (typeof setupCallback === 'function') {
setupCallback(editor);
}
} });

@@ -52,0 +49,0 @@ if (isTextarea(this.element)) {

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

@@ -20,4 +20,5 @@ "repository": {

"test": "jest",
"build": "npm run clean && tsc -p ./tsconfig.es2015.json && tsc -p ./tsconfig.cjs.json",
"watch": "tsc -w -p ./tsconfig.es2015.json"
"build": "npm run test && npm run clean && tsc -p ./tsconfig.es2015.json && tsc -p ./tsconfig.cjs.json",
"watch": "tsc -w -p ./tsconfig.es2015.json",
"prepare": "npm run build"
},

@@ -24,0 +25,0 @@ "jest": {

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