How to use ketcher with typescript #1181
Replies: 2 comments 4 replies
-
Hi @mwbouwkamp-mendix , Ketcher packages provide all required types so you should cast your object . Please look at https://github.com/epam/ketcher/blob/master/example/src/App.tsx for example (onInit handler). In your case you should do something like this: but it will work only if your ketcher app is hosted correctly. Best regards, |
Beta Was this translation helpful? Give feedback.
-
Hey @AndreiMazol Thank you for your answer. I have ketcher in a sub-folder in the src folder of my project. I would say that counts as the same domain, right? Any suggestions? Regards, |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am having issues of using ketcher with typescript. Mostly because I am not sure how to define my types. Does anyone have an example?
Adding the iframe to the page is not the problem, but I am struggling with interacting with it (e.g., setting the structure or listening to changes)
Getting the iframe is also not the problem (I can get the ketcherFrame via ref.current, see below), but how to get the ketcher object?
Regards
Marco
Beta Was this translation helpful? Give feedback.
All reactions