Open zspishere opened 2 years ago
Dear @zspishere ,
Thank you for interest to Ketcher. It is a good idea to use an additional abstraction to hide Ketcher settings so it will be implemented in scope release 2.5.
Best regards, Andrei
Moved to release 2.6
Hi, Ketcher is a great chemical structure editor. And I have an electron app using it as a default molecule editor.
My App Dependencies: "ketcher-react": "2.4.1", "ketcher-standalone": "1.3.0"
Is your feature request related to a problem? Please describe. I would like to provide a feature to save ketcher settings data into my remote database for my users. But I could not get or set the settings data from or by Ketcher Handler, because there is no methods about it.
Describe the solution you'd like
How to set settings Invoke
ketcher.setConfigs(data)
to initialize the settings data, just likeketcher.setMolecule(mol)
. Or, set default settings when rendering the Editor, likesettings={defaultSettings}
, same asbuttons={hideKetcherBtns}
.How to get settings Invoke
ketcher.getConfigs()
to get settings data, just likeketcher.getMolfile()
orketcher.getSmiles()
. Or, callback an user level funciton, likeonInit={handleOnInit}
in above code block.Additional context I have noticed that the settings data has been saved in Local Storage as ketcher-opts. So, is getting/setting the ketcher-opts a workaround about this feature request? Or, it is a official recommendation?
Thanks a lot!