Hello. I want to re-open an old topic but with additional details
As a Joplin Plugin Developer, I would like to have the possibility to save custom note properties for saving plugin metadata regarding a selected note and have access to this info in the future (i.e.: from Joplin.workspace.selectedNote().properties)
Is it possible and how do other developers save their plugin metadata about notes (except note body) ?
@roman_r_m interesting suggestion. But it's not plugin properties, it's note properties.
This approach will require creating a table for each note.
Also cleaning staff of non-existed (deleted) notes might be challenging
Other ways?
Sqlite supports the JSON field now. I think no new table will be required now. Only a new properties field (defaults to {}) in the post table. Users can store keys and values there and query on them.
While a plugin can read all properties from all plugins, they shouldn't be able to add/modify/delete any property outside it's namespace. This will allow users to create a multi-plugin workflow while being safe from malicious plugins.