Example plugins
The four plugins that ship with Tintero, what each one is worth reading for, and which to open first.
On this page
Reading a plugin that works beats reading a page about plugins. Four of them ship with Tintero. They are all in the plugin browser inside the app, and each one is a public repository you can clone and read in an afternoon.
Start with one of these two
Project Inspector
fnadalrod/Project-Inspector---Tintero-plugin
A sidebar panel that walks through every part of your project data and shows you what is in
there. No build step: one plugin.js, one plugin.css, one icon.svg.
Read it for the widest tour of tintero.project you will find in a single file, and for a shell
dialog opened with ui.openDialog() and filled with ui.render().
It also asks for almost every read permission there is, which makes it worth installing once just to see what a long list looks like in the approval dialog. Yours should be shorter.
Dev Console
fnadalrod/Dev-mode---Tintero-plugin
Shows the plugin log stream in a panel, using debug.console . Small, and the clearest example of subscribing to an event and re-rendering from it:
tintero.events.on('debug.log', function (entry) {
appendRow(entry);
});
Read it for debug.getLogs(), debug.clear(), a subscription that guards against registering
itself twice, and how to lay out for a full page rather than a narrow column.
Then, by what you are building
Full Focus Mode
fnadalrod/Full-focus-mode---Tintero-plugin
A timed writing session that takes over the main view, built with React and Vite. The biggest of the four, and the one to read if your plugin writes anything.
Read it for:
- A Vite config that produces one injectable file, stylesheet included. It is the second setup
in React, Vue & bundlers, down to
manualChunks: undefined. ui.sidebar.panelpointing at a builtindex.html.- Reading and writing chapters through
convert.toHtml()andconvert.fromHtml(). ui.toggleFullscreen(),ui.hideSidebar()andui.showSidebar(), which are what make a focus mode feel like one.fs.getPlatform(), to behave differently on desktop and on the web.
World Codex Wiki
fnadalrod/World-Codex---Tintero-plugin
Builds a browsable wiki out of your characters, worldbuilding and manuscript.
Read it for the shape of a plugin that reads a lot: permissions across most of the project, convert.format to turn chapters into something searchable, and storage to hold onto the result rather than rebuilding it on every start.
What none of them cover
Two things you will not find in these repositories, both written up here instead:
- A dialog with its own HTML file, its own script and a
dialog-closeresult. See Dialogs. net.fetchand thenetwork.domainsallow-list. See the security model.
A note on reading their manifests
All four predate the surfaces field and declare only type. That still works, because Tintero
works one out from the other, but new plugins should write both.
All four also ask for ui.sidebar even though three of them are app
plugins, which looks like a mistake and sometimes is not. That one permission covers two separate
things: the sidebar surface, and tintero.ui.render(). Dev Console needs it for the second. If
you are doing neither, drop it.
Type your manifest against the definitions and at least the spelling cannot go wrong.