Utils and classes to load chem resources embedded or linked in HTML page.
The chem resources (usually a formatted file (.mol, .cml...) or a formatted string)
can be embedded in <script> tag:
<script id="chem1" type="chemical/x-mdl-molfile">
Untitled Document-1
ChemDraw09151219572D
2 1 0 0 0 0 0 0 0 0999 V2000
-0.4125 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.4125 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0
M END
</script>
or linked in by <script> or <link> tag as the follows:
<script id="chem2" type="chemical/x-kekule-json" src="externalMol.kcj"></script>
<link id="chem3" type="chemical/x-cml" href="external.cml" />
Afterwards, user can ref to chem resource by ID directly in HTML code, such as:
<div data-kekule-role="Kekule.ChemWidget.Viewer2D" data-chem-obj="url(#chem1)" />
which will initialize a 2D viewer.