Skip to content

PluginDataHandler.saveData method

PluginDataHandler › saveData

Saves data to the plugin's data file.

The data is serialized exactly as Obsidian writes it, and its UTF-8 byte length is checked before anything is written.

Signature:

saveData(data: unknown): Promise<void>

Parameters:

ParameterTypeDescription
dataunknownThe data to save.

Returns: Promise<void> — A promise that resolves when the data is saved.