New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-codemirror2

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-codemirror2 - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

9

index.js

@@ -151,5 +151,13 @@ 'use strict';

this.hydrated = false;
if (!this.props.resetCursorOnSet) {
this.cursorPos = this.editor.getCursor();
}
}
this.hydrate(nextProps);
if (!this.props.resetCursorOnSet) {
this.editor.setCursor(this.cursorPos);
}
}

@@ -178,2 +186,3 @@ }, {

if (this.props.value && !this.hydrated) {
this.editor.setValue(props.value);

@@ -180,0 +189,0 @@

6

package.json
{
"name": "react-codemirror2",
"version": "0.0.7",
"version": "0.0.8",
"description": "a tiny react codemirror component wrapper",

@@ -57,7 +57,7 @@ "main": "index.js",

"react-redux": "5.0.5",
"redux": "3.7.1",
"redux": "3.7.2",
"sass-loader": "6.0.6",
"style-loader": "0.18.2",
"webpack": "3.1.0"
"webpack": "3.2.0"
}
}

@@ -41,3 +41,3 @@ [![Build Status](https://travis-ci.org/scniro/react-codemirror2.svg?branch=master)](https://travis-ci.org/scniro/react-codemirror2)

```jsx
import CodeMirror from 'react-codemirror2'
import CodeMirror from 'react-codemirror2';
require('codemirror/mode/xml/xml');

@@ -53,2 +53,4 @@ require('codemirror/mode/javascript/javascript');

> triggers `onValueSet`
- `resetCursorOnSet`
> `boolean` reset the internal codemirror cursor position should a new `value` prob be set. Default: `false`

@@ -55,0 +57,0 @@ ## component specific events

Sorry, the diff of this file is not supported yet

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