jsMolEditor

...because JavaScript matters

  • Increase font size
  • Default font size
  • Decrease font size
Home Deployment Guide

Deployment Guide

E-mail Print PDF

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.
Last Updated on Saturday, 31 January 2009 18:17  

Newsflash

jsMolEditor makes it easy to deploy a molecule editor into your web site. Whether you want a web-based chemical database or you're displaying a chemical structure in your web site.