-
Notifications
You must be signed in to change notification settings - Fork 13
Plugin API
Place JavaScript files in the /plugins/ directory in the root of the app and they'll get loaded when the app is opened.
On Mac the directory is inside the app:
Marknote.app/Contents/Resources/app.nw/plugins
Create the directory if it doesn't exist.
Fired when the app has finished loading. Wait for this event before calling any Marknote functions.
Fired when a note has finished loading.
Arguments
Name | Description |
---|---|
note | ID of the loaded note. |
previousnote | ID of the previous note. |
Fired when the editor is loaded.
Arguments
Name | Description |
---|---|
note | ID of the note being edited. |
Fired when the note is displayed (after editing).
Arguments
Name | Description |
---|---|
note | ID of the note being displayed. |
Returns true if a note is showing, false if the editor is showing.
Generates and returns the title for a note.
Creates a new note from markdown in the background.
Loads a note, if select is true the note is highlighted.
If select isn't defined, it defaults to true.
Deletes a note.
Duplicates a note.
Saves the notes to localStorage, and if syncing is enabled to the cloud.
Switches to the rendered display.
Opens the markdown editor.
Log note ID on note switch.
api.on("apiready", function()
{
api.on("noteloaded", function(e)
{
console.log(e.note);
});
});