Closed weasteam closed 3 years ago
Hi @weasteam, the same I/O function can be used to save chem document to .kcj/.kcx. For example, to save the document inside a composer widget:
let obj = composer.getChemObj();
let kcxData = Kekule.IO.saveFormatData(obj, Kekule.IO.DataFormat.KEKULE_XML); // save to .kcx
let kcjData = Kekule.IO.saveFormatData(obj, Kekule.IO.DataFormat.KEKULE_JSON); // save to .kcj
Thank you @partridgejiang
It worked.
Kekule can save each molecular but the lines are missing in a reaction when I reload the saved data.
However, I tested the Savefile function in the UI with the .kcj and kcx, I am able to display the exact reaction (include the lines).
May I know what function should I call to get a .kcj or kcx of a whole document/reaction?