Add a new custom button on the toolbar.
the button definition including id, name, icon
Add a new template to the template list on the left sidebar.
the template definition including name, structure and icon
Applies editor settings.
set of settings client would like to apply.
Moves to drawing center if not empty.
Clears canvas.
Resets undo stack.
Exports the current content of the canvas as a document format.
the document type in which to export, e.g. CXON, MRV, Mol:V2, Mol:V3, SMILES, CXSMILES, SMARTS, CXSMARTS, InChI, InChIKey, CDX, CDXML, SKC, SDF, RDF, RXN.
OptionalexportOptions: ExportDocumentOptions
optional settings to apply during export.
The generated document as a string value.
Exports the current content of the canvas as an image.
currently supported image types: JPG, PNG, SVG, WEBP (WebP image format is partially supported on Safari).
OptionalexportOptions: ExportOptions
settings to be used for image export.
The generated image as a string value.
Fits the view around the canvas content by adjusting zoom and pan.
Requests focus on the editor canvas. Focus is only acquired if the canvas is freely accessible (no dialog or overlay is currently open).
Gets the current selection from the canvas. Selection is returned as a string array containing the CXON ids of the selected atoms.
Retrieves the current settings of the editor.
Imports document. Content is displayed on the previously cleared canvas.
the document content. Source format determined automatically.
OptionalimportOptions: ImportOptions
to configure import if differ from default. Default values are { clearCanvas: true, select: false, throwError: true, placement: 'TOP_LEFT', scale: 'NONE' }
Determines whether the canvas is empty or not.
true if nothing on the canvas, else false.
Deregister a previously registered event handler.
the event type associated to the client event handler.
OptionaleventHandler: EventHandler
the event handler function.
Register event handler.
passes the event type client needs notification for.
the event handler function.
OptionaleventInit: ReopenEventInitializerRemove a template from the template list on the left sidebar.
the template definition including name, structure and icon
Removes Marvin from the dom.
Sets the selection on the canvas. Argument must contain CXON ids of the atoms to be selected.
Functions supported by Marvin.