Wisk API Documentation

This doc is outdated. We will be updating it soon. Dont judge us for this.
And yes this is bad currently. We are working on it.

Index

1. Introduction

This doc deals with building plugins for Wisk, a web-based note-taking app. Plugins are self-contained components that can be added to the editor to extend its functionality. The Wisk API provides a way to interact with the editor and the database, as well as to manage themes.

The Wisk API is accessible through the window.wisk object, which serves as the host for the Wisk API. It contains the following main components:

2. Plugins

The window.wisk.plugins object provides the following methods and properties:

2.1 Plugin Structure

A plugin is a JavaScript object with the following properties:

2.2 Plugin Components

Each component in the contents array is an object with the following properties:

Component Categories

The category property determines how the component will be shown. It can be any one of the following:

2.3 Plugin Configuration Example

"example": {
    "example": {
        "name": "example",
        "title": "Example",
        "icon": "access-manager.svg",
        "tags": ["example", "demo"],
        "description": "An example plugin",
        "contents": [
            {
                "title": "Example",
                "icon": "example.svg",
                "category": "mini-dialog",
                "component": "example",
                "nav": false,
                "module": false,
                "textual": true
            }
        ]
    }
}

2.4 Plugin Methods

Plugins can have the following optional methods:

2.5 Plugin Functions

Plugins can run these functions to interact with the editor and/or other plugins:

3. Database (db)

Wisk supports a key-value store database. The following methods are available: // change to getPages etc

4. Theme

Theme data is stored locally in the browser. The window.wisk.theme object supports the following methods:

5. Editor

The window.wisk.editor object supports these properties and methods: