Plugins are stored in wm/plugins folder. Each sub folder represents a plugin and it needs to contain at least one plugin_name.js file. Wm supports javascript as it’s scripting language. It utilizes Jint javascript interpreter for .NET (http://jint.codeplex.com) which currently implements all concepts defined in ECMAScript version 3.0. Version 5.0 is not supported at the moment.
Javascript is commonly used for handling web browser’s DOM objects but in our case it can interact with:
Special “monkey” object that allows you to interact with different aspects of current writemonkey instance. For example:
monkey.selectedText = "this will be inserted at current caret position";
There are couple of quick and dirty examples already there; I wrote them more as a proof of a concept than anything else. You can open js files and see what’s inside, modify them. Note that you don’t need to use .NET stuff at all. You can just put together simple javascript “macros”.
Included proto plugins:
Later on it will be possible to initialize plugins at startup (plugin “Set double return” would be a good candidate) but right now they can only be deployed by CTRL+F10. To run last used script, hit CTRL+ALT+F10.
Feedback welcomed.
Plugins will be available only to donors / wm key owners.