v1.17.1
Don't miss all the new features in 1.17.0.
API Beta: New Feature 🎉
Modal component
Adds ntb.modal()
which displays a modal with the provided string content, or file contents. Thanks @FelipeRearden for the suggestion!
// shows a modal with the provided string
await ntb.modal("_Hello_ world!");
// shows a modal with the content of a file
const filename = "Welcome.md";
const file = app.vault.getAbstractFileByPath(filename);
if (file) {
await ntb.modal(file, {
title: `**${file.basename}**`
});
}
else {
new Notice(`File not found: ${filename}`);
}
See the documentation and examples folder (NtbModal.js
), or learn more about the Note Toolbar API.
Full Changelog: 1.17.0...1.17.1