Skip to content

Allow multiple instances of editor #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 18, 2017

Conversation

makkynz
Copy link
Contributor

@makkynz makkynz commented May 16, 2017

solve issue where when multiple instances of the editor exists, a style change (e.g bold, list, italics, etc) on one instance was also updating the other instances. This fix generates a unique id for each instance that the update event checks to ensure only the correct instance is actually updated

@makkynz makkynz force-pushed the hotfix/allow-multiple-instances branch from 48a9330 to 26831ae Compare May 16, 2017 04:12
… style change (e.g bold, list, italics, etc) on one instance was also updating the others. This fix generates a unique id for each instance that the update event checks to ensure only the correct instance is actually updated
@makkynz makkynz force-pushed the hotfix/allow-multiple-instances branch from 26831ae to 1dd4a6c Compare May 16, 2017 04:13
Copy link
Owner

@jrm2k6 jrm2k6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, would it be possible to add some unit tests?

@@ -105,6 +107,7 @@ var MarkdownEditor = React.createClass({
},

updateText: function(text, selection, actionType) {
debugger;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, remove the debugger statement.

@makkynz
Copy link
Contributor Author

makkynz commented May 16, 2017

@jrm2k6 unit test will come shortly

@makkynz makkynz force-pushed the hotfix/allow-multiple-instances branch from 3b93359 to 2b49212 Compare May 18, 2017 09:31
@jrm2k6 jrm2k6 merged commit 7881525 into jrm2k6:master May 18, 2017
@jrm2k6
Copy link
Owner

jrm2k6 commented May 18, 2017

@makkynz Thanks a lot! Approved and merged.

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

Successfully merging this pull request may close these issues.

2 participants