Socket
Socket
Sign inDemoInstall

react-sane-contenteditable

Package Overview
Dependencies
21
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.1.2

2

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

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -7,3 +7,3 @@ # react-sane-contenteditable

## Why?
ContentEditable has some known issues. The purpose of this component is to deal with the implementation details so you don't have to! 🔥
ContentEditable has some well known issues, and the purpose of this component is to deal with them so you don't have to! 🔥

@@ -10,0 +10,0 @@ * Clean and sanitise the output

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

tagName: PropTypes.string,
}
};

@@ -23,3 +23,3 @@ const defaultProps = {

tagName: 'div',
}
};

@@ -76,4 +76,4 @@ class ContentEditable extends Component {

_onChange = (ev) => {
const { sanatise } = this.props;
const rawValue = this.refs.element.innerText;
const { sanitise } = this.props;
const rawValue = this._element.innerText;
const value = sanitise ? this.sanitiseValue(rawValue) : rawValue;

@@ -98,3 +98,3 @@

const { sanitise } = this.props;
const rawValue = this.refs.element.innerText;
const rawValue = this._element.innerText;
const value = sanitise ? this.sanitiseValue(rawValue) : rawValue;

@@ -111,3 +111,3 @@

const { maxLength, multiLine } = this.props;
const value = this.refs.element.innerText;
const value = this._element.innerText;

@@ -132,3 +132,3 @@ // return key

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

@@ -135,0 +135,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