Unlike in V5.6β : How to use an external browser with the open method I’d like to create a new Inkdrop owned browser window so I can transform the content of the current note and render it into this new window. I can’t seem to figure out a way to do this using the electron API but maybe I’m missing something?
After a bit more searching, I found that inkdrop.remote exists and can be used to create a new window and display content.
Note: you cannot interact directly with the DOM of this new window and must tell it which URL to navigate to. Luckily you can set data in the url as in the following example:
ink = require('inkdrop')
const win = new ink.remote.BrowserWindow()
win.loadURL("data:text/html;charset=utf-8,<body><h1>hello</h1></body>")
There should also be ways to do this using IPC calls, but I am not familiar with them - if anyone has experience with these, please reply with more information.
Yeah, you can use @electron/remote via inkdrop.remote. It sounds scary to allow plugins to create BrowserWindow though
Maybe I should prohibit remote entirely for security reasons.
Or, it’d be nice to have a permission mechanism for plugins so users can notice those sensitive actions in the future.
Currently, it is fully relied on your goodwill