Skip to content
This repository has been archived by the owner on Jul 25, 2018. It is now read-only.

Return change object with onChange #10

Open
jrunning opened this issue Mar 4, 2015 · 1 comment
Open

Return change object with onChange #10

jrunning opened this issue Mar 4, 2015 · 1 comment

Comments

@jrunning
Copy link

jrunning commented Mar 4, 2015

At present, the react-code-mirror component only gives the new content of the document to onChange handlers (presumably for consistency with React's textarea implementation). However, CodeMirror's internal change event fires with additional, useful information:

The changeObj is a {from, to, text, removed, origin} object containing information about the changes that occurred as second argument.

It would be great if the React component also provided this information to onChange handlers.

@ForbesLindesay
Copy link
Owner

Happy to accept pull requests.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants