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 nameString name of the module
namespaceString namespace/path used to require your module that implements your share library
labelString 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 pleasesParameters:
Name Type Description nameString module name to share on
contentstring content to share
metaobject (optional) additional meta information