From 1aacf46946667ad24eb06b5795a78c36db40bbca Mon Sep 17 00:00:00 2001 From: Dmitrii Vasilev Date: Thu, 18 May 2023 18:11:08 +0300 Subject: [PATCH] #2619 - added the getCDXml and getCDX methods to the ketcher api --- packages/ketcher-core/src/application/ketcher.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/ketcher-core/src/application/ketcher.ts b/packages/ketcher-core/src/application/ketcher.ts index 8f197274c3..b66af20d13 100644 --- a/packages/ketcher-core/src/application/ketcher.ts +++ b/packages/ketcher-core/src/application/ketcher.ts @@ -217,6 +217,22 @@ export class Ketcher { ) } + getCDXml(): Promise { + return getStructure( + SupportedFormat.cdxml, + this.#formatterFactory, + this.#editor.struct() + ) + } + + getCDX(): Promise { + return getStructure( + SupportedFormat.cdx, + this.#formatterFactory, + this.#editor.struct() + ) + } + getInchi(withAuxInfo = false): Promise { return getStructure( withAuxInfo ? SupportedFormat.inChIAuxInfo : SupportedFormat.inChI,