ChemWriter

ChemWriter 2

Load a Molfile at Startup

The ChemWriter editor can be loaded at startup with a molfile by using the molfile parameter. Linefeeds are replaced with the \n character sequence.

<!DOCTYPE HTML> 
<html>
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, IE=9">
    <link rel=stylesheet href="chemwriter.css" type="text/css" media=screen />
    <link rel=stylesheet href="chemwriter-skin.css" type="text/css" media=screen />
    <script src="chemwriter.js"></script>
  </head>
  <body>
    <div id="editor"></div>
    <script>
      chemwriter.loadEditor('editor', {
        licensePath: '/chemwriter.lic',
        molfile:    '[NO NAME]\n  CHEMW2  0102110749032D                              \nCreated with ChemWriter - http://chemwriter.com\n 19 20  0  0  1  0            999 V2000\n   -5.6083   -4.5501    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -4.6083   -4.5501    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -4.1083   -3.6841    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -4.6083   -2.8180    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -5.6083   -2.8180    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -6.1083   -3.6841    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -7.1083   -3.6841    0.0000 Cl  0  0  0  0  0  0  0  0  0  0  0  0\n   -3.1083   -3.6841    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -4.1083   -1.9520    0.0000 Cl  0  0  0  0  0  0  0  0  0  0  0  0\n   -2.6083   -2.8180    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n   -2.6083   -4.5501    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -1.6082   -2.8180    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -1.1082   -1.9520    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.1082   -1.9520    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -1.6082   -4.5501    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n   -1.0205   -5.3591    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.0694   -5.0501    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n   -0.0694   -4.0501    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n   -1.0205   -3.7411    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  1  2  1  0  0  0  0\n  2  3  2  0  0  0  0\n  3  4  1  0  0  0  0\n  4  5  2  0  0  0  0\n  5  6  1  0  0  0  0\n  6  1  2  0  0  0  0\n  6  7  1  0  0  0  0\n  3  8  1  0  0  0  0\n  4  9  1  0  0  0  0\n  8 10  1  1  0  0  0\n  8 11  1  0  0  0  0\n 10 12  1  0  0  0  0\n 12 13  1  0  0  0  0\n 13 14  2  0  0  0  0\n 11 15  1  0  0  0  0\n 15 16  1  0  0  0  0\n 16 17  2  0  0  0  0\n 17 18  1  0  0  0  0\n 18 19  2  0  0  0  0\n 19 15  1  0  0  0  0\nM  END\n'
      });
    </script>
  </body>
</html>