home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2000 July / macformat-092.iso / Dreamweaver 3 / Configuration / Menus / MM / Import Word HTML.js < prev    next >
Encoding:
Text File  |  1999-12-01  |  778 b   |  28 lines

  1. // Copyright 1999 Macromedia, Inc. All rights reserved.
  2.  
  3.  
  4. //*************** GLOBALS  *****************
  5.  
  6. var CMD_PATH = 'Clean Up Word HTML.htm';
  7.  
  8.  
  9. //***************** LOCAL FUNCTIONS  ******************
  10.  
  11. function init() {
  12.   var curDOM, newDOM;
  13.   // Select the word file to be imported, don't show images, supress not in root warnings.
  14.   var fileName = browseForFileURL("open", MSG_Word_Import, false, true);  //returns a local filename
  15.   if (fileName) {
  16.     // Check for name may not exist.
  17.     curDOM = dw.getDocumentDOM(fileName);
  18.     if (curDOM) {
  19.       newDOM = dw.createDocument();
  20.       if (newDOM) {
  21.         newDOM.documentElement.outerHTML = curDOM.documentElement.outerHTML;
  22.         
  23.         dreamweaver.popupCommand(CMD_PATH); //launch the command
  24.       }
  25.     }
  26.   }
  27. }
  28.