Deployment Guide for Developers & Site Administrators
jsMolEditor runs in pure JavaScript. To integrate jsMolEditor into your web site, first thing you need to do is including two js files in your page. As shown below.
<script type="text/javascript" language="javascript" src="/jsmoleditor/jsmoleditor.js"></script>
You can specify the position of editor by a named <DIV> tag, for example:
<div id="editor1"></div>
To initialize the editor and specify the size of editor, use the javascript code below.
<script type="text/javascript">initEditor('editor1', 500, 300); </script>This will initialize a 500px x 300px editor in the DIV tag with id 'editor1'.
To import and export molecule structure(in mol structure) into the editor, two JavaScript APIs is provided. importMolFile(divID,molFileContent) is provided to import mol file. Two parameters are needed, the ID of the DIV tag where the editor is located, and the mol file content as text. exportMolFile(divID) is provided to export mol file content as text.



Deployment Guide

