Easily add new sharing tool to the Komodo command set and UI
Methods
-
require("ko/share").register(name, namespace, label)
-
Register a new sharing tool Registers the modules namespace and adds available menu items The UI elements that are augmented with the Share menu are:
- Editor context menu
- Dynamic toolbar
- trackchanges button
- diff dialogs
- RX generator?
- logs dialog
Modules share function should take (content, filename, fileType)
Parameters:
Name Type Description name
String name of the module
namespace
String namespace/path used to require your module that implements your share library
label
String Label for menuitems
-
require("ko/share").share(name, content, meta)
-
Share content on specified module
Example
meta = { title: "myfile.js", language: "javascript" } This is passed to the submodules `share` function to do with what it pleases
Parameters:
Name Type Description name
String module name to share on
content
string content to share
meta
object (optional) additional meta information