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

react-ckeditor-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-ckeditor-wrapper - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

60

lib/ckeditor.js
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});

@@ -30,30 +30,40 @@

var CKEditor = function (_Component) {
(0, _inherits3["default"])(CKEditor, _Component);
(0, _inherits3["default"])(CKEditor, _Component);
function CKEditor(props) {
(0, _classCallCheck3["default"])(this, CKEditor);
return (0, _possibleConstructorReturn3["default"])(this, _Component.call(this));
}
function CKEditor(props) {
(0, _classCallCheck3["default"])(this, CKEditor);
CKEditor.prototype.componentDidMount = function componentDidMount() {
if (!CKEDITOR) {
console.error('CKEditor not found');
return;
}
CKEDITOR.appendTo(_reactDom2["default"].findDOMNode(this));
};
var _this = (0, _possibleConstructorReturn3["default"])(this, _Component.call(this, props));
CKEditor.prototype.render = function render() {
return _react2["default"].createElement(
'div',
null,
_react2["default"].createElement(
'h1',
null,
'Hello World!'
)
);
};
_this.state = {
value: _this.props.value,
config: _this.props.config || {},
onChange: _this.props.onChange
};
return _this;
}
return CKEditor;
CKEditor.prototype.handleChange = function handleChange(value) {
console.log(value);
this.state.onChange(value);
};
CKEditor.prototype.componentDidMount = function componentDidMount() {
var _this2 = this;
if (!window.CKEDITOR) {
console.error('CKEditor not found');
return;
}
var instance = window.CKEDITOR.appendTo(_reactDom2["default"].findDOMNode(this), this.state.config, this.state.value);
instance.on('change', function () {
_this2.handleChange(instance.getData());
});
};
CKEditor.prototype.render = function render() {
return _react2["default"].createElement('div', null);
};
return CKEditor;
}(_react.Component);

@@ -60,0 +70,0 @@

{
"name": "react-ckeditor-wrapper",
"version": "1.0.5",
"version": "1.0.6",
"description": "CKEditor wrapper for react",

@@ -5,0 +5,0 @@ "keywords": [

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