huh, I thought that with Electron we can use in any device? I even thought that Obsidian itself is an Electron app?
No worry this plugin is only intended to run on desktop.
I see that there is a create method:
create(path: string, data: string, options?: DataWriteOptions): Promise<TFile>;
but I’m not sure if this is the correct one, nor how to use it. I don’t know what option I have to put in the DataWriteOptions. My code is now:
export default class MyPlugin extends Plugin {
async onload() {
var jsonContent = JSON.stringify(this.app.plugins.plugins.breadcrumbs.mainG.toJSON());
console.log(jsonContent)
app.vault.create(".", jsonContent);
and it says
Uncaught (in promise) Error: File already exists.
I also try to search for my variable, but there is no app.plugins.plugins.dotmaker.jsonContent in the console.