-
Notifications
You must be signed in to change notification settings - Fork 1
Hooks
Called when the addon gets enabled. This is either on startup of the program, or when the user approves the permissions and enables the addon from the settings.
-
Form mainFormThe Nimble Writer main form.
Called when the addon gets disabled. This is either when the program closes, or when the user disables it in the settings.
Called after all Nimble Writer settings have been loaded. This only gets called on program startup, not when a user enables the addon manually in the settings.
-
Settings settingsThe settings object.
Called when the user clicks on the Addons button. This will open a menu, which you can add your own items to. You can add separators as needed (add an item with "-" as value).
-
MenuItemsCollection menuItemsThe list of menu items you should add items to.
Called when the user switches to a different chapter, or when the system has to switch to a different chapter automatically. (Such a thing happens in some cases during export, which is a temporary "bug" for now.)
-
int iChapterThe chapter index that has been switched to. -
StoryChapter chapterThe chapter object that has been switched to.
Called after loading a document.
-
String strFilenameThe path for the document that was loaded. -
StoryDocument documentThe document object that was loaded.
Called after saving a document.
-
String strFilenameThe path for the document that was saved. -
StoryDocument documentThe document object that was saved.
Called during document saving. This can be used to save arbitrary data into the nwd file (which is actually just a zip file with contents). See zip saving for more details.
-
String strFilenameThe filename that the nwd file is being saved to. -
StoryDocument documentThe document object that is being saved. -
ZipFile zipTheZipFileobject that you can add new files to.
Called during document loading for zip entries that are not recognized by Nimble Writer itself. This can be used to load arbitrary data from the nwd file (which is actually just a zip file with contents). See zip saving for more details.
-
String strFilenameThe filename that the nwd file is being loaded from. -
StoryDocument documentThe document object that is being loaded in its current state. -
ZipEntry entryTheZipEntryobject of the unrecognized file. -
ZipFile zipTheZipFileobject that you can load files from.
Called on the loading of the "edit" view on user notes.
-
JsonNote noteThe usernote object for which this view is intended. -
Panel panelThe panel in which the note's edit controls are.
Called on the loading of the "view" view on user notes.
-
JsonNote noteThe usernote object for which this view is intended. -
Panel panelThe panel in which the note's view controls are.
Called when user switches to the "edit" view.
-
JsonNote noteThe usernote object for which this view is intended. -
Panel panelThe panel in which the note's edit controls are.
Called when user switches to the "view" view.
-
JsonNote noteThe usernote object for which this view is intended. -
Panel panelThe panel in which the note's view controls are.
Called on the fetching of the text of a usernote. In the callback, return the replacement text you'd like to show. If you return nil, it will remain the default value.
-
JsonNote noteThe usernote object of the related note. -
string originalThe original string that would show if the function returns nil.
Called on the fetching of the subtext of a usernote. In the callback, return the replacement text you'd like to show. If you return nil, it will remain the default value.
-
JsonNote noteThe usernote object of the related note. -
string originalThe original string that would show if the function returns nil.
Called when the program writes a string to console.
-
String strThe string to write to console.
Called when the program writes a line to console.
-
String strLineThe line to write to console.