Module: ko/button

The button SDK allows you to easily register and insert buttons without having to write the required markup, ensuring forward compatibility as much as possible.

Methods


require("ko/button").register(label, command, opts)

Register a new button

Example
opts = {
     id:"",
     label:"",
     command:function(){},
     toolbar: boolean,
     classlist: [""]
  }
Parameters:
Name Type Description
label String | Object

Optionally this can hold the entire opts object, with a label and command entry

command function

The callback function

opts Object

Options

Returns:
Type
Void

require("ko/button").unregister(id, opts)

Unregister given button

Parameters:
Name Type Description
id String

Command ID

opts Object

context, id

Returns:
Type
Void