Skip to content

Rendering ketcher-react plugin with the initialize data #586

Answered by AndreiMazol
mustafacanp asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @mustafacanp ,

Now you can get access to ketcher instance by passing an additional property to Editor component. See example of usage below:

<Editor 
      staticResourcesUrl={process.env.PUBLIC_URL}
      structServiceProvider={structServiceProvider}
      onInit={ketcher => {
        setTimeout(() => {
          ketcher.setMolecule('CCCCCCCCCC>>CCCCCCCCC')
        }, 5000)
      }}
    />

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
6 replies
@mustafacanp
Comment options

@mustafacanp
Comment options

@AndreiMazol
Comment options

@AndreiMazol
Comment options

@mustafacanp
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by mustafacanp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants