The athanor-editor element
Load athanor-embed.js and write <athanor-editor smiles="c1ccccc1"></athanor-editor>. It takes smiles, tools, readonly, theme, label, stereo and src attributes and fires ready and change events.
Steps
<script src="https://athanor.arbastro.com/app/embed/athanor-embed.js"></script>
<athanor-editor smiles="c1ccccc1" tools="select,bond,ring,erase" style="height: 360px"></athanor-editor>
<athanor-editor smiles="CN1C=NC2=C1C(=O)N(C(=O)N2C)C" readonly label="Caffeine"></athanor-editor>Attributes
smiles, tools, readonly, theme (dark or light), label, stereo and src. They mean what the options of the same names mean. Changing readonly or smiles on a live element changes the editor.
Methods and events
- The element has the same methods as the editor object, such as
getSmiles()andsetStructure(), each returning a promise, and areadypromise. - It fires
readyandchangeDOM events.event.detailis the protocol event. editor.setTheme('dark'), or setting itsthemeattribute, switches the theme in place.
Its default height is 420 px; set your own with CSS. Types for both the element and the script are in athanor-embed.d.ts, next to the script.
Is this helpful?
Last updated Nov 12, 2026
- Still stuck? Read the FAQ or contact support.
- Something wrong on this page? Tell us.
- For AI tools: llms.txt
