Itās not currently designed for custom fields, so itās not possible to remove them via editingNote.update
action at the moment.
yep, good point. Cleaning up is important.
The field prefix āx-ā is not sufficient for cleaning up.
The plugin name should be able to be inferred by the field names like āx-plugin-name-fieldNameā.
But I guess scanning all the notes to clean them up may take a while if the user has a lot of notes.
Another way to store custom data is to create separate docs something like:
{
"_id": "plugin:PLUGIN_NAME:<CUSTOM_DOC_ID>",
...(custom data)
}
The āCUSTOM_DOC_IDā can be arbitrary.
In this way, you can make a doc for each note that has custom data:
{
"_id": "plugin:PLUGIN_NAME:<NOTE_ID>",
...(custom data)
}
In this way, the app can support removing them anytime.
But I need further discussion on this because that makes the app complicated.
The database and sync could be broken.