Skip to content
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

add custom id property for editor #58

Open
wants to merge 1 commit into
base: master
from

Conversation

@faradaytrs
Copy link

faradaytrs commented Mar 11, 2019

This is the same pull request, but without updating dependencies.

This PR allows us to pass an id prop when creating an editor. The previous implementation always used editor for the id which worked but caused issues when creating multiple editors on one page.

This PR fixes the issue by letting us pass a unique id prop to each editor, if no id prop is passed, the default is editor.

Simplified example of multiple editors:

export default class Example extends React.Component {
  render() {
      return (
          <Editor id="editor-1" />
          <Editor id="editor-2" />
      );
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.