editor

Actions for managing the editor app state, including changing, saving, closing, and creating notes, as well as changing the view mode.


change(needsUpdatingDate)

Change Action

Flag the editing note as changed, indicating it needs to be saved.

  • Name
    needsUpdatingDate
    Type
    boolean
    Required
    Description

    Whether the note's updatedAt field needs to be updated or not.

Set the Editor State as 'Changed'

If you manipulated the note data and want the app to save it:

import { actions } from 'inkdrop'
inkdrop.store.dispatch(actions.editor.change(true))

save()

Save Action

Save the currently editing note.

  • Name
    save
    Type
    function
    Description

    Saves the editing note.


close()

Close Action

Close the editing note. The changes in the note will be saved.


create()

Create Action

Create a new note and open it.


changeViewMode(viewMode)

Change View Mode Action

Change the editor view mode.

  • Name
    viewMode
    Type
    string
    Required
    Description

    The editor view mode.


Can you help us improve the docs? 🙏

The source of these docs is here on GitHub. If you see a way these docs can be improved, please fork us!