Replies: 1 comment
-
I found this: #1049 and replicated the result, when first loading a ketcher windows in react application. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I saw lots of examples and good usages in React, but I am using django currently and use build in template, So I downloaded standalone package and implement to a Django project with JS, index.html, Css files.
First of all, the editor works.
But had issues to access Ketcher functions like .setMolecular with javascript by following this link https://lifescience.opensource.epam.com/ketcher/developers-manual.html#installation
The workflow is:
and Write the codes :
`
var ketcherFrame = document.getElementById('ifKetcher');
var ketcher = null;
if ('contentDocument' in ketcherFrame)
ketcher = ketcherFrame.contentWindow.ketcher;
else // IE7
ketcher = document.frames['ifKetcher'].window.ketcher;
`
3. Then I expected result is able to access ketcher functions like .setMolecular... But I got ketcher is undefined.
and the contentWindow objects has property ketcher with "U" tag (guess meaning undefined).
Not sure did everything properly, hope someone can help me. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions