Developing with ChemWriter

ChemWriter Scripting

Last Updated on Friday, March 07, 2008.

JavaScript and ChemWriter

JavaScript makes it possible to dynamically manipulate ChemWriter content. The technique consists of:

  1. Assigning the id attribute for your <object> tag, for example id="editor".
  2. Using the JavaScript function document.getElementById, for example var editor=document.getElementById("editor").

All methods defined in the ChemWriter public Java API are available in JavaScript.