Socket
Socket
Sign inDemoInstall

react-sane-contenteditable

Package Overview
Dependencies
3
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.2 to 1.1.3

14

lib/index.js

@@ -59,5 +59,5 @@ 'use strict';

_this._onChange = function (ev) {
var sanatise = _this.props.sanatise;
var sanitise = _this.props.sanitise;
var rawValue = _this.refs.element.innerText;
var rawValue = _this._element.innerText;
var value = sanitise ? _this.sanitiseValue(rawValue) : rawValue;

@@ -84,3 +84,3 @@

var rawValue = _this.refs.element.innerText;
var rawValue = _this._element.innerText;
var value = sanitise ? _this.sanitiseValue(rawValue) : rawValue;

@@ -100,3 +100,3 @@

var value = _this.refs.element.innerText;
var value = _this._element.innerText;

@@ -166,2 +166,4 @@ // return key

value: function render() {
var _this2 = this;
var _props2 = this.props,

@@ -174,3 +176,5 @@ Element = _props2.tagName,

return _react2.default.createElement(Element, _extends({}, (0, _lodash.omit)(props, Object.keys(propTypes)), {
ref: 'element',
ref: function ref(c) {
return _this2._element = c;
},
style: _extends({ whiteSpace: 'pre-wrap' }, props.style),

@@ -177,0 +181,0 @@ contentEditable: editable,

{
"name": "react-sane-contenteditable",
"version": "1.1.2",
"version": "1.1.3",
"description": "React component with sane defaults to make any element contentEditable",

@@ -33,3 +33,4 @@ "main": "lib/index.js",

"scripts": {
"build": "babel src/react-sane-contenteditable.js --out-file lib/index.js"
"build": "babel src/react-sane-contenteditable.js --out-file lib/index.js",
"prepublish": "npm run build"
},

@@ -36,0 +37,0 @@ "bugs": {

@@ -127,3 +127,3 @@ import React, { Component } from 'react';

{...omit(props, Object.keys(propTypes))}
ref={(c) => this._element = c;}
ref={(c) => this._element = c}
style={{ whiteSpace: 'pre-wrap', ...props.style }}

@@ -130,0 +130,0 @@ contentEditable={editable}

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc