DW Extensions: What, Where, Why, How?
It seems there is more than one meaning for "extension". The one I want to discuss: files an individual DW user creates, fills with code, and places in a dedicated folder, in the case of Macs and the latest DW:
~/Library/Application Support/Adobe/Dreamweaver CC 2017/en_US/Configuration/Commands/
These are usually in HTML--JS pairs, e.g. Extension1.htm and Extension1.js, containing --respectively-- the initialization and the implementing JavaScript code for what the extension does. This results in the DW menu item
Tools-->Commands-->Extension1
which activates the extension. It has full access to the DOM of the current file, so all sorts of transformations are possible.
Q1: What's the definitive, unambiguous description for this kind of extension?
- - -
I write extensions for complex tasks that I do often in my workflow. For example, the built-in tool
Tools-->Clean Up Word HTML
only does part of the clean-up I want to do, so I wrote a variant that does what I need.
This capability is vital to my workflow!
- - -
When I debug extensions, I edit the extension files in the above-named directory, then I use a command hidden in the "insert" palette that reloads all the extensions in that directory. (In recent versions of DW CC, doing this causes my DW to crash. The only workaround I can think of is to quit and re-launch DW to trigger extension loading.) Then I activate the extension and see what happens. Sometimes I trigger Alerts in the code to tell me what's happening. Rinse, Lather, Repeat. Classic printf debugging.
Q2: Is there an alternative development flow?
Q3: The ExtendScript Toolkit (4.x) is an extended-JS debugging environment: Is it capable of debugging DW extensions as defined above? If so, how is this initialized?
Q4: Or, ...what?
- - -
Q5. Are there any web forums or similar resources specifically supporting this kind of DW extension development?
TIA
