API reference
All 253 methods the plugin SDK exposes, with the permission each one requires.
On this page
- tintero.project
- tintero.knowledge
- tintero.structure
- tintero.boards
- tintero.fs
- tintero.ui
- tintero.storage
- tintero.settings
- tintero.app
- tintero.backup
- tintero.events
- tintero.export
- tintero.import
- tintero.editor
- tintero.annotations
- tintero.citations
- tintero.debug
- tintero.convert
- tintero.net
- tintero.media
Read out of tintero-plugin-sdk.build.ts, the SDK that Tintero puts inside your
plugin's frame. The shapes and descriptions come from the published type definitions. The
permission each one needs comes from methodScopeMap, which is the table Tintero
itself checks on every call.
tintero.project
tintero.project.addBookmark() #
Add a bookmark: its anchor goes into the chapter text. Scope: project.write.fileContent.
addBookmark(data: BookmarkInput) → Promise<Bookmark> tintero.project.addCharacter() #
Create a new character. Requires at least name.
addCharacter(data: CharacterInput) → Promise<Character> tintero.project.addCharacterVariant() #
Adds a variant at the end. name is required. Scope: project.write.characters.
addCharacterVariant(characterId: string, data: CharacterVariantInput) → Promise<CharacterVariant> tintero.project.addDoc() #
Create a new document in the project. Returns the created doc metadata.
addDoc(data: DocInput) → Promise<DocMetadata> tintero.project.addFile() #
Create a new file in the project. Returns the created file metadata.
addFile(data: FileInput) → Promise<FileMetadata> tintero.project.addImage() #
Save an image (a base64 string or a data: URI) into the project and return
a reference to the saved image. Assign it to a character/worldbuilding
portrait or landscape. Requires the project.write.images scope. Pairs
with net.fetch({ responseType: 'base64' }) to import a remote image.
addImage(data: string, fileName?: string) → Promise<string> tintero.project.addNote() #
Create a new note. Requires location.
addNote(data: NoteInput) → Promise<Note> tintero.project.addWorldbuildingElement() #
Create a new worldbuilding element. Requires name and type.
addWorldbuildingElement(data: WorldbuildingInput) → Promise<WorldbuildingElement> tintero.project.addWritingGoal() #
Create a writing goal, as the goals panel does. Scope: project.write.goals.
addWritingGoal(data: WritingGoalInput) → Promise<WritingGoal> tintero.project.appendDocContent() #
Append blocks at the end of a document. Same format and scope as appendFileContent().
appendDocContent(docId: string, jsonContent: string) → Promise<void> tintero.project.appendFileContent() #
Append blocks AT THE END of a chapter, open or not, without sending the rest. jsonContent is a
ProseMirror document string (same format as updateFileContent()); its top-level blocks are
appended. Meant for writing a long text in parts. Scope project.write.fileContent.
appendFileContent(fileId: string, jsonContent: string) → Promise<void> tintero.project.archiveWritingGoal() #
Archive a goal (there is no hard delete; archiving twice is a no-op). Scope: project.write.goals.
archiveWritingGoal(goalId: string) → Promise<WritingGoal> tintero.project.createFlowMap() #
Create an empty flow map. Requires project.write.flowmaps.
createFlowMap(name: string) → Promise<FlowMap> tintero.project.createFolder() #
Create a folder in the root or inside another folder. Throws if one already lives at that path.
createFolder(data: FolderInput) → Promise<FolderInfo> tintero.project.createPracticeTest() #
Create a multiple-choice practice test document, the same one "Process with AI > Test" creates
(shuffled options, 📝 icon, answer key title in the app language). Invalid questions are dropped
with a reason; with fewer than 3 valid ones nothing is created and it throws with the reasons.
Scope: project.write.docs.
createPracticeTest(data: PracticeTestInput) → Promise<PracticeTestResult> tintero.project.createWorldbuildingTemplate() #
Create a worldbuilding template of the project (or the extra fields of a built-in kind). Requires project.write.worldbuilding.
createWorldbuildingTemplate(data: WorldbuildingTemplateInput) → Promise<CustomWorldbuildingTemplate> tintero.project.deleteBookmark() #
Delete a bookmark from the index, like the bookmarks panel. Scope: project.write.files.
deleteBookmark(bookmarkId: string) → Promise<{ bookmarkId: string }> tintero.project.deleteCharacter() #
Deletes a character permanently, the same way as from its sheet: the ties other characters had with it are removed too, and so are the worldbuilding fields, timeline blocks, flow map nodes and scenes (point of view, cast) that pointed at it. There is no undo. Resolves with the ids of the characters that lost a tie.
deleteCharacter(characterId: string) → Promise<{ characterId: string; untiedCharacterIds: string[] }> tintero.project.deleteCharacterVariant() #
Deletes a variant permanently. Scope: project.write.characters.
deleteCharacterVariant(characterId: string, variantId: string) → Promise<{ characterId: string; variantId: string }> tintero.project.deleteDocs() #
DESTRUCTIVE, no recycle bin: deletes documents with everything under them, the same way as deleting
from the tree. Documents of a character or worldbuilding sheet are refused. Scope: project.write.docs.
deleteDocs(data: DeleteItemsInput) → Promise<DeleteItemsResult> tintero.project.deleteFiles() #
DESTRUCTIVE, no recycle bin: deletes chapters with everything under them, the same way as deleting
from the tree (disk, sync and descendants). Scope: project.write.files.
deleteFiles(data: DeleteItemsInput) → Promise<DeleteItemsResult> tintero.project.deleteFlowMap() #
Delete a flow map. Requires project.write.flowmaps.
deleteFlowMap(flowMapId: string) → Promise<boolean> tintero.project.deleteFolders() #
DESTRUCTIVE, no recycle bin: deletes folders with every chapter, document and subfolder in them,
the same way as deleting from the tree. Images, audio and PDFs inside are kept and moved out.
Scope: project.write.files.
deleteFolders(data: DeleteItemsInput) → Promise<DeleteItemsResult> tintero.project.deleteImage() #
DESTRUCTIVE, no recycle bin: deletes an image (metadata and bytes) and detaches it from the
character and worldbuilding sheets that used it. Scope: project.write.images.
deleteImage(imageId: string) → Promise<{ imageId: string }> tintero.project.deleteMediaAsset() #
DESTRUCTIVE, no recycle bin: deletes an audio file or a PDF (metadata and bytes), as the tree
does. Scope: project.write.media.
deleteMediaAsset(kind: MediaKind, assetId: string) → Promise<{ kind: MediaKind; assetId: string }> tintero.project.deleteWorldbuildingTemplate() #
Delete a template. Its elements stay, without their labels; archiving is the gentle option. Requires project.write.worldbuilding.
deleteWorldbuildingTemplate(templateId: string) → Promise<TemplateDeletion> tintero.project.duplicateFile() #
Duplicate a chapter with its text, next to the original, as the tree does. Scope: project.write.files.
duplicateFile(fileId: string) → Promise<DuplicatedFile> tintero.project.getBookmarks() #
The bookmarks of the manuscript, in reading order. Scope: project.read.files.
getBookmarks() → Promise<Bookmark[]> tintero.project.getCardboards() #
Get all cardboard grids with their cells.
getCardboards() → Promise<CardboardGrid[]> tintero.project.getCharacterById() #
Get a character by ID.
getCharacterById(id: string) → Promise<Character | null> tintero.project.getCharacterCraft() #
The craft fields of a character sheet: role, archetype, drive, voice, stats, personality axes, arc and attached images. Scope: project.read.characters.
getCharacterCraft(characterId: string) → Promise<CharacterCraft> tintero.project.getCharacterVariants() #
The variants of a character, in their order. Scope: project.read.characters.
getCharacterVariants(characterId: string) → Promise<{ characterId: string; variants: CharacterVariant[] }> tintero.project.getCharacters() #
Get all characters.
getCharacters() → Promise<Character[]> tintero.project.getCollections() #
Get all collections.
getCollections() → Promise<Collection[]> tintero.project.getCustomWorldbuildingTemplates() #
Get the project's custom worldbuilding templates. Read-only.
getCustomWorldbuildingTemplates() → Promise<CustomWorldbuildingTemplate[]> tintero.project.getDocContent() #
Get the raw content of a document by its ID. Returns a ProseMirror/TipTap JSON string, or null. Same format as getFileContent().
getDocContent(docId: string) → Promise<string | null> tintero.project.getDocs() #
Get all documents (metadata only), each with its kind; { kind } keeps only that kind.
getDocs(options?: DocListOptions) → Promise<DocMetadata[]> tintero.project.getFileContent() #
Get the raw content of a file by its ID.
Returns the file content as a ProseMirror/TipTap JSON string (the internal
document format), or null if the file does not exist or has no content.
You must JSON.parse() the result to obtain a ProseMirrorDocument object,
or pass the raw string directly to tintero.convert.toHtml() / toMarkdown() /
toText(). Those methods accept both the raw string and a parsed object.
getFileContent(fileId: string) → Promise<string | null> tintero.project.getFileSnapshots() #
Get the version snapshots of a file by its ID. Read-only.
getFileSnapshots(fileId: string) → Promise<FileSnapshot[]> tintero.project.getFiles() #
Get all project files (metadata only, no content).
getFiles() → Promise<FileMetadata[]> tintero.project.getFlowMapById() #
Get one flow map by its ID, or null if it does not exist. Requires project.read.flowmaps.
getFlowMapById(flowMapId: string) → Promise<FlowMap | null> tintero.project.getFlowMaps() #
Get all flow maps (nodes and connections). Requires project.read.flowmaps.
getFlowMaps() → Promise<FlowMap[]> tintero.project.getFolders() #
Get the project's folder tree structure.
getFolders() → Promise<FolderInfo[]> tintero.project.getImageData() #
Get a project image as a base64 data URL. Accepts the image fileName or relativePath (e.g. "portrait.png" or "images/portrait.png"). Returns a string like "data:image/png;base64,..." or null if not found. Use this to display project images inside plugin iframes.
getImageData(imageRef: string) → Promise<string | null> tintero.project.getImages() #
Get all images metadata.
getImages() → Promise<ImageInfo[]> tintero.project.getMediaAssets() #
Metadata of the project's audio files and/or PDFs (never the bytes). Scope: project.read.media.
getMediaAssets(kind?: MediaKind) → Promise<MediaAsset[]> tintero.project.getMetadata() #
Get project metadata (name, dates, description).
getMetadata() → Promise<ProjectMetadata> tintero.project.getNotes() #
Get all notes.
getNotes() → Promise<Note[]> tintero.project.getPlotGrids() #
Get all plot grids with their columns and cells.
getPlotGrids() → Promise<PlotGrid[]> tintero.project.getScenes() #
Get the scenes defined within a file by its ID. Read-only.
getScenes(fileId: string) → Promise<Scene[]> tintero.project.getSettingGenres() #
Get the setting genres picked for the project (cyberpunk, atompunk…) and every genre that can
be picked, with its label in the app language. Requires project.read.worldbuilding.
getSettingGenres() → Promise<SettingGenres> tintero.project.getTags() #
Get all project tags.
getTags() → Promise<string[]> tintero.project.getTimelines() #
Get all timelines (lanes, blocks, notes, milestones). Read-only.
getTimelines() → Promise<Timeline[]> tintero.project.getWordCountLog() #
Get the per-day word count log. Read-only.
getWordCountLog() → Promise<WordCountLog[]> tintero.project.getWorldbuilding() #
Get all worldbuilding elements.
getWorldbuilding() → Promise<WorldbuildingElement[]> tintero.project.getWorldbuildingByType() #
Get worldbuilding elements by type (e.g. "location", "faction").
getWorldbuildingByType(type: string) → Promise<WorldbuildingElement[]> tintero.project.getWritingGoals() #
Get the user's writing goals (words/chapters/minutes targets). Read-only.
getWritingGoals() → Promise<WritingGoal[]> tintero.project.getWritingMinutesLog() #
Get the per-day writing-minutes log. Read-only.
getWritingMinutesLog() → Promise<WritingMinutesLog[]> tintero.project.moveCharacterToFolder() #
Moves a character to a folder of the characters panel ("Cast/Minor"); null or "" is the top level. Scope: project.write.characters.
moveCharacterToFolder(characterId: string, folderPath: string | null) → Promise<{ characterId: string; folderPath: string | null }> tintero.project.moveItem() #
Move a chapter, document or folder, with everything under it, keeping its id. Chapters go in the root or a folder; documents in the root, a folder, a chapter or another document; folders in the root or another folder (never inside themselves).
moveItem(data: MoveItemInput) → Promise<MoveItemResult> tintero.project.removeCharacterRelationship() #
Removes a tie by its pairId, and its mirror row on the other character. Scope: project.write.characters.
removeCharacterRelationship(characterId: string, pairId: string) → Promise<{ characterId: string; pairId: string; otherCharacterId: string; mirrorRemoved: boolean }> tintero.project.removeWorldbuildingElement() #
Delete a worldbuilding element by ID.
removeWorldbuildingElement(id: string) → Promise<void> tintero.project.renameFlowMap() #
Rename a flow map. Requires project.write.flowmaps.
renameFlowMap(flowMapId: string, name: string) → Promise<FlowMap> tintero.project.renameImage() #
Rename an image of the project (its tree name follows). Scope: project.write.images.
renameImage(imageId: string, title: string) → Promise<ImageInfo> tintero.project.renameMediaAsset() #
Rename an audio file or a PDF (its tree name follows). Scope: project.write.media.
renameMediaAsset(kind: MediaKind, assetId: string, title: string) → Promise<MediaAsset> tintero.project.reorderCharacterVariants() #
Puts the variants in this order; the list must hold every variant once. Scope: project.write.characters.
reorderCharacterVariants(characterId: string, variantIds: string[]) → Promise<{ characterId: string; variants: CharacterVariant[] }> tintero.project.searchProse() #
Search the chapter PROSE (not the metadata) for a term, matching whole words and ignoring
accents. Returns the chapters where it occurs, how many times, a few excerpts around the
matches and where each one is (occurrences, as editor.replaceText counts them). Use it to
answer "where/how does X appear" when the metadata is not enough. in: 'docs' | 'all' also
searches the project documents (their hits carry docId instead of chapterId).
Bounded on purpose: maxChapters (250 by default) keeps a large manuscript from being read
end to end on every call. Pass several forms of the same name (full name, first name) as an
array to match any of them in one pass.
searchProse(term: string | string[], options?: ProseSearchOptions) → Promise<ProseSearchHit[]> tintero.project.setCharacterRelationship() #
Creates or changes a tie between two characters, like the Relationships section of the sheet:
a two-way tie also writes the mirror row on the other character (inverse kind, shared facts),
and kinship is worked out from these ties. Scope: project.write.characters.
setCharacterRelationship(characterId: string, tie: RelationshipInput) → Promise<RelationshipResult> tintero.project.setCharacterWorldLinks() #
Replaces the worldbuilding elements a character is linked to through one link: a built-in one
(species, factions, locations…) or a custom field of a template, as
custom:<templateId>/<fieldId>. [] removes every link. Scope: project.write.characters.
setCharacterWorldLinks(characterId: string, link: string, elementIds: string[]) → Promise<{ characterId: string; link: string; elementIds: string[] }> tintero.project.setSettingGenres() #
Replace the project's setting genres with genreIds (an empty list clears them). If any id is
not in getSettingGenres().available, NOTHING is saved and the unknown ones come back in
unknown. Requires project.write.worldbuilding.
setSettingGenres(genreIds: string[]) → Promise<SetSettingGenresResult> tintero.project.updateBookmark() #
Rename, renumber or move a bookmark. Scope: project.write.fileContent.
updateBookmark(bookmarkId: string, changes: BookmarkUpdate) → Promise<Bookmark> tintero.project.updateChapterBookSettings() #
Book role and/or place in the reading order of a chapter. Scope: project.write.files.
updateChapterBookSettings(fileId: string, settings: ChapterBookSettings) → Promise<ChapterBookResult> tintero.project.updateCharacter() #
Update an existing character's fields. Only provided fields are changed.
updateCharacter(id: string, data: Partial<CharacterInput>) → Promise<void> tintero.project.updateCharacterCraft() #
Changes craft fields with the rules of the sheet (keys, ids that exist) and returns them all. Scope: project.write.characters.
updateCharacterCraft(characterId: string, changes: CharacterCraftChanges) → Promise<CharacterCraft> tintero.project.updateCharacterVariant() #
Changes a variant's name, description or overrides. Scope: project.write.characters.
updateCharacterVariant(characterId: string, variantId: string, changes: CharacterVariantInput) → Promise<CharacterVariant> tintero.project.updateDocContent() #
Update the content of a document. Same format as updateFileContent().
updateDocContent(docId: string, jsonContent: string) → Promise<void> tintero.project.updateDocMeta() #
Update document metadata (not content). Only provided fields are changed.
updateDocMeta(id: string, data: DocMetaUpdate) → Promise<void> tintero.project.updateFileContent() #
Update the content of a file.
jsonContent must be a ProseMirror/TipTap JSON string, i.e. the result of
JSON.stringify(proseMirrorDocumentObject). To build a document from other formats,
use tintero.convert.fromHtml(), fromMarkdown(), or fromText() first, then
JSON.stringify() the returned object before passing it here.
updateFileContent(fileId: string, jsonContent: string) → Promise<void> tintero.project.updateFileMeta() #
Update file metadata (not content). Only provided fields are changed.
updateFileMeta(id: string, data: FileMetaUpdate) → Promise<void> tintero.project.updateFlowMap() #
Replace a flow map's nodes and connections. The payload is validated in full BEFORE anything
is written, so a malformed one leaves the project untouched: ids must be unique strings, every
connection must point at a node in the same payload, coordinates must be finite numbers and
colours must be plain CSS colours. Requires project.write.flowmaps.
updateFlowMap(flowMapId: string, update: FlowMapUpdate) → Promise<FlowMap> tintero.project.updateFolder() #
Rename a folder (what hangs from it follows) and/or set its colour or icon. Scope: project.write.files.
updateFolder(data: FolderUpdate) → Promise<FolderInfo> tintero.project.updatePracticeTest() #
Replace the questions of a document that already is a practice test. The saved attempt is cleared;
sourceFileId is kept unless given. Scope: project.write.docs.
updatePracticeTest(data: PracticeTestUpdate) → Promise<PracticeTestResult> tintero.project.updateProjectInfo() #
Name, description and/or cover of the project. Scope: project.write.files.
updateProjectInfo(data: ProjectInfoUpdate) → Promise<ProjectInfo> tintero.project.updateTags() #
Replace all project tags.
updateTags(tags: string[]) → Promise<void> tintero.project.updateWorldbuildingElement() #
Update an existing worldbuilding element.
updateWorldbuildingElement(id: string, data: Partial<WorldbuildingInput>) → Promise<void> tintero.project.updateWorldbuildingTemplate() #
Change a template: name, description, colour, the whole field list, or archive it. Requires project.write.worldbuilding.
updateWorldbuildingTemplate(templateId: string, changes: WorldbuildingTemplateChanges) → Promise<CustomWorldbuildingTemplate> tintero.project.updateWritingGoal() #
Change the target and/or title of an active goal. Scope: project.write.goals.
updateWritingGoal(goalId: string, changes: WritingGoalChanges) → Promise<WritingGoal> tintero.knowledge
Derived questions answered in prose: chapters and characters resolved by name.
tintero.knowledge.chaptersWithCharacter() #
The chapters a character appears in, according to the project metadata.
chaptersWithCharacter(character: string) → Promise<string> tintero.knowledge.characterAppearanceCounts() #
Appearance counts per character, most frequent first. With an argument, that character's chapters.
characterAppearanceCounts(character?: string) → Promise<string> tintero.knowledge.findChapter() #
Resolve a chapter by number ("chapter 7"), id, or a fragment of its title.
findChapter(reference: string) → Promise<string> tintero.knowledge.getChapterSynopsis() #
The author-written synopsis of a chapter. Cheap: prefer it over the full prose.
getChapterSynopsis(chapter: string) → Promise<string> tintero.knowledge.getChapterText() #
The prose of a chapter resolved by reference, clipped to 20.000 characters.
getChapterText(chapter: string) → Promise<string> tintero.knowledge.getCharacterProfile() #
The full profile of a character (traits, backstory, goals, fears) by id or name.
getCharacterProfile(character: string) → Promise<string> tintero.knowledge.getCharacterRelationships() #
A character's relationships with other characters, with the names resolved.
getCharacterRelationships(character: string) → Promise<string> tintero.knowledge.getDocument() #
The text of a non-chapter document (synopsis, world bible) by id, name or title fragment.
getDocument(document: string) → Promise<string> tintero.knowledge.getKinship() #
What character B is to character A by the family tree (parentage and unions), worked out, not declared.
getKinship(characterA: string, characterB: string) → Promise<string> tintero.knowledge.getWorldbuildingProfile() #
The full profile of a worldbuilding element by id or name.
getWorldbuildingProfile(element: string) → Promise<string> tintero.knowledge.listChapters() #
Every chapter with its number, status, length, whether it has a summary, and its characters.
listChapters() → Promise<string> tintero.knowledge.summarizeChapter() #
A summary of a chapter the author never summarised, generated on demand.
Scopes: ai.summarize AND project.read.fileContent (the summary is derived from the prose).
It calls the AI server configured in Tintero's settings, so it costs
the user time and quota; returns the author's own summary when there is one, without calling
any model.
summarizeChapter(chapter: string) → Promise<string> tintero.structure
Writing the structure around the prose: timelines, flow maps, collections, scenes, notes.
tintero.structure.addFlowMapConnection() #
Joins two existing nodes with an arrow. Both node ids must exist or the call fails.
addFlowMapConnection(flowMapId: string, connection: FlowMapConnectionInput) → Promise<FlowMapConnection> tintero.structure.addFlowMapNode() #
Adds a node to a flow map and returns it, with the id Tintero assigned.
addFlowMapNode(flowMapId: string, node: FlowMapNodeInput) → Promise<FlowMapNode> tintero.structure.addManyToCollection() #
Puts several chapters and documents into a manual collection in one go. Items already in it are skipped without error. Every id must exist in the open project, or nothing is added. Fails on a smart collection. Resolves with how many were actually added.
addManyToCollection(collectionId: string, items: { itemId: string; itemType: 'file' | 'doc' }[]) → Promise<number> tintero.structure.addTimelineBlock() #
Puts a chapter, a scene or a worldbuilding event on a lane. A document block needs
fileId; an event block needs eventId. The id of the block is assigned by Tintero.
addTimelineBlock(timelineId: string, laneId: string, block: TimelineBlockInput) → Promise<TimelineBlock> tintero.structure.addTimelineLane() #
Adds a lane (one strand of the story) and returns it.
addTimelineLane(timelineId: string, name: string) → Promise<TimelineLane> tintero.structure.addTimelineMilestone() #
Adds a milestone across every lane (a turning point, a climax).
addTimelineMilestone(timelineId: string, milestone: { text: string; position: number; color?: string }) → Promise<TimelineMilestone> tintero.structure.addTimelineSegment() #
Names a stretch of the axis: an act, a part, a season.
addTimelineSegment(timelineId: string, segment: { name: string; startCol: number; spanCols: number; color?: string }) → Promise<TimelineSegment> tintero.structure.addToCollection() #
Puts a chapter (file) or a document (doc) into a collection.
addToCollection(collectionId: string, itemId: string, itemType: 'file' | 'doc') → Promise<void> tintero.structure.createCollection() #
Creates an empty, manual collection of chapters and documents and returns it.
createCollection(name: string) → Promise<Collection> tintero.structure.createFlowMap() #
Creates a flow map and returns it.
createFlowMap(name: string) → Promise<FlowMap> tintero.structure.createFlowMapFromDraft() #
Creates a WHOLE flow map in one call, laid out by Tintero from left to right following the
arrows. Nodes carry a key you make up ("a", "b"…) and connections join keys, so you never
handle ids or coordinates. At most 40 nodes. With linkedDocument, every node links to that
chapter or document. Resolves with the new map's id and what was dropped.
createFlowMapFromDraft(draft: { name?: string; nodes: { key: string; label: string; text?: string }[]; connections?: { from: string; to: string; label?: string }[]; }, linkedDocument?: string) → Promise<{ flowMapId: string; flowMapName: string; nodeCount: number; connectionCount: number; trimmedNodes: number; droppedConnections: number }> tintero.structure.createScene() #
Creates a scene inside a chapter. Unlike the editor's own dialog, it needs the chapter id.
createScene(fileId: string, scene: SceneInput) → Promise<Scene> tintero.structure.createTimeline() #
Creates a timeline and returns it. parentId hangs it off a block of another timeline.
createTimeline(name: string, parentId?: string) → Promise<Timeline> tintero.structure.deleteCollection() #
Deletes a collection. The chapters and documents in it are not deleted.
deleteCollection(collectionId: string) → Promise<void> tintero.structure.deleteFlowMap() #
Deletes a flow map with its nodes and arrows.
deleteFlowMap(flowMapId: string) → Promise<void> tintero.structure.deleteNote() #
Deletes a note and its body.
deleteNote(noteId: string) → Promise<void> tintero.structure.deleteScene() #
Deletes a scene from the chapter that owns it.
deleteScene(sceneId: string) → Promise<void> tintero.structure.deleteTimeline() #
Deletes a timeline and everything on it.
deleteTimeline(timelineId: string) → Promise<void> tintero.structure.deleteTimelineLane() #
Deletes a lane with its blocks, notes and own milestones (the chapters stay). Resolves with what went.
deleteTimelineLane(timelineId: string, laneId: string) → Promise<{ laneId: string; removedBlocks: number; removedNotes: number; removedMilestones: number }> tintero.structure.deleteTimelineMilestone() #
Deletes a milestone.
deleteTimelineMilestone(timelineId: string, milestoneId: string) → Promise<void> tintero.structure.deleteTimelineSegment() #
Deletes a named stretch of the axis. Blocks are not touched.
deleteTimelineSegment(timelineId: string, segmentId: string) → Promise<void> tintero.structure.moveBetweenCollections() #
Moves a member of a manual collection to another manual one (at the end).
moveBetweenCollections(fromCollectionId: string, toCollectionId: string, itemId: string, itemType: 'file' | 'doc') → Promise<void> tintero.structure.moveInCollection() #
Moves a member of a manual collection to position toIndex (0-based, the index it will have
afterwards, counted on items as getCollections() returns them). Out of range is rejected.
moveInCollection(collectionId: string, itemId: string, itemType: 'file' | 'doc', toIndex: number) → Promise<void> tintero.structure.moveScene() #
Move a scene (text and metadata) to another chapter (it lands at the end) and/or to another slot
among its chapter's scenes (0 = first). Scope: project.write.scenes.
moveScene(sceneId: string, move: SceneMove) → Promise<SceneMoveResult> tintero.structure.removeFlowMapConnection() #
Removes an arrow.
removeFlowMapConnection(flowMapId: string, connectionId: string) → Promise<void> tintero.structure.removeFlowMapNode() #
Removes a node and the arrows that touched it.
removeFlowMapNode(flowMapId: string, nodeId: string) → Promise<void> tintero.structure.removeFromCollection() #
Takes an item out of a collection.
removeFromCollection(collectionId: string, itemId: string, itemType: 'file' | 'doc') → Promise<void> tintero.structure.removeTimelineBlock() #
Removes a block from a lane.
removeTimelineBlock(timelineId: string, laneId: string, blockId: string) → Promise<void> tintero.structure.renameCollection() #
Renames a collection.
renameCollection(collectionId: string, name: string) → Promise<void> tintero.structure.renameFlowMap() #
Renames a flow map.
renameFlowMap(flowMapId: string, name: string) → Promise<void> tintero.structure.renameTimeline() #
Renames a timeline.
renameTimeline(timelineId: string, name: string) → Promise<{ id: string; name: string }> tintero.structure.renameTimelineLane() #
Renames a lane.
renameTimelineLane(timelineId: string, laneId: string, name: string) → Promise<{ id: string; name: string }> tintero.structure.setCollectionSmartFilters() #
Makes the collection SMART with these filters (same shape as CollectionSmartFilter, without
id; logic defaults to AND). An empty list turns it back into a manual one that keeps the
members it has now.
setCollectionSmartFilters(collectionId: string, filters: Array<Omit<CollectionSmartFilter, 'id' | 'logic'> & { logic?: 'AND' | 'OR' }>) → Promise<{ collectionId: string; smart: boolean; memberCount: number }> tintero.structure.setTimelineAxis() #
Sets how the axis is labelled. These are labels, never real dates. Pass null to unset it.
setTimelineAxis(timelineId: string, axis: { unit?: string; start: number; step: number } | null) → Promise<void> tintero.structure.updateCollectionAppearance() #
Changes how a collection looks in the panel. Only the keys you pass are touched; an empty
string or null clears that one. color must be #rrggbb.
updateCollectionAppearance(collectionId: string, appearance: { color?: string | null; icon?: string | null; description?: string | null }) → Promise<void> tintero.structure.updateFlowMapConnection() #
Changes an arrow: its text, style, colour or either end (which must be an existing node).
updateFlowMapConnection(flowMapId: string, connectionId: string, changes: FlowMapConnectionUpdate) → Promise<FlowMapConnection> tintero.structure.updateFlowMapNode() #
Changes a node: text, shape, colour, position, links. Absent fields stay; an empty string clears a link. The open canvas shows the change at once.
updateFlowMapNode(flowMapId: string, nodeId: string, changes: FlowMapNodeUpdate) → Promise<FlowMapNode> tintero.structure.updateNote() #
Rewrites a note's body and colour. The body hash is resealed, which is what sync compares.
updateNote(noteId: string, data: { content: string; type?: string }) → Promise<void> tintero.structure.updateScene() #
Edits a scene. Only the fields you pass change.
updateScene(sceneId: string, updates: Partial<SceneInput>) → Promise<Scene | null> tintero.structure.updateTimelineBlock() #
Changes a block: laneId moves it to another lane, startCol/spanCols place it on the axis.
Absent fields stay; an empty string clears color, characterId or worldbuildingId.
updateTimelineBlock(timelineId: string, laneId: string, blockId: string, changes: TimelineBlockUpdate) → Promise<TimelineBlock> tintero.structure.updateTimelineMilestone() #
Changes a milestone, whether it belongs to the whole story or to one lane.
updateTimelineMilestone(timelineId: string, milestoneId: string, changes: { text?: string; position?: number; color?: string }) → Promise<TimelineMilestone> tintero.structure.updateTimelineSegment() #
Changes a named stretch of the axis. An empty color clears it.
updateTimelineSegment(timelineId: string, segmentId: string, changes: { name?: string; startCol?: number; spanCols?: number; color?: string }) → Promise<TimelineSegment> tintero.boards
Writing the boards: the cardboard and the plot grids.
tintero.boards.addCardboardColumn() #
Adds an empty column at the right.
addCardboardColumn(gridId: string) → Promise<void> tintero.boards.addCardboardNote() #
Adds a sticky note or a checkbox to a card. Image, audio and pdf notes need an asset and are not available here.
addCardboardNote(gridId: string, cellId: string, note: { kind: 'sticky' | 'checkbox'; title?: string; content?: string; color?: string; checked?: boolean }) → Promise<CardboardCell> tintero.boards.addCardboardReference() #
Pins a chapter, doc, character or worldbuilding element to a card. The target must exist.
addCardboardReference(gridId: string, cellId: string, refType: 'chapter' | 'doc' | 'character' | 'worldbuilding', targetId: string) → Promise<CardboardCell> tintero.boards.addCardboardRow() #
Adds an empty row at the bottom.
addCardboardRow(gridId: string) → Promise<void> tintero.boards.addPlotGridChaptersColumn() #
Inserts an empty chapters column first, for an old plot grid that lacks it; the others move one place right.
addPlotGridChaptersColumn(gridId: string) → Promise<PlotGridColumn> tintero.boards.addPlotGridColumn() #
Adds a plot column at the right and returns it.
addPlotGridColumn(gridId: string, name?: string) → Promise<PlotGridColumn> tintero.boards.addPlotGridRow() #
Adds a row at the bottom.
addPlotGridRow(gridId: string) → Promise<void> tintero.boards.addPlotGridRowNote() #
Adds a banner above a row (an act, a part). rowIndex equal to the row count puts it after the last row.
addPlotGridRowNote(gridId: string, rowIndex: number, note?: { content?: string; color?: string; height?: number }) → Promise<{ id: string; rowIndex: number; content: string; color?: string; height?: number }> tintero.boards.clearPlotGridCell() #
Empties a cell.
clearPlotGridCell(gridId: string, cellId: string) → Promise<void> tintero.boards.createCardboard() #
Creates a cardboard with empty cells and returns it. rows and cols default to 3.
createCardboard(name: string, rows?: number, cols?: number) → Promise<CardboardGrid> tintero.boards.createPlotGrid() #
Creates a plot grid with the chapters column and two empty plot columns, three rows.
createPlotGrid(name: string) → Promise<PlotGrid> tintero.boards.deleteCardboard() #
Deletes a cardboard with every card on it.
deleteCardboard(gridId: string) → Promise<void> tintero.boards.deleteCardboardColumn() #
Deletes a column and its cards. The columns to the right move left.
deleteCardboardColumn(gridId: string, colIndex: number) → Promise<void> tintero.boards.deleteCardboardNote() #
Removes a note from a card.
deleteCardboardNote(gridId: string, cellId: string, noteId: string) → Promise<CardboardCell> tintero.boards.deleteCardboardRow() #
Deletes a row and its cards. The rows below move up. A cardboard keeps at least one row.
deleteCardboardRow(gridId: string, rowIndex: number) → Promise<void> tintero.boards.deletePlotGrid() #
Deletes a plot grid with everything in it.
deletePlotGrid(gridId: string) → Promise<void> tintero.boards.deletePlotGridColumn() #
Deletes a column and its cells. The chapters column (position 0) cannot be deleted.
deletePlotGridColumn(gridId: string, columnId: string) → Promise<void> tintero.boards.deletePlotGridRow() #
Deletes a row and its cells. The rows below move up, and so do the banners anchored below it.
deletePlotGridRow(gridId: string, rowIndex: number) → Promise<void> tintero.boards.deletePlotGridRowNote() #
Deletes a banner.
deletePlotGridRowNote(gridId: string, noteId: string) → Promise<void> tintero.boards.movePlotGridColumn() #
Swaps a plot column with its neighbour. The chapters column stays where it is.
movePlotGridColumn(gridId: string, columnId: string, direction: 'left' | 'right') → Promise<boolean> tintero.boards.movePlotGridRow() #
Swaps a row with the one above or below.
movePlotGridRow(gridId: string, rowIndex: number, direction: 'up' | 'down') → Promise<boolean> tintero.boards.removeCardboardReference() #
Unpins a reference from a card. A card left empty goes back to unassigned.
removeCardboardReference(gridId: string, cellId: string, referenceId: string) → Promise<CardboardCell> tintero.boards.renameCardboard() #
Renames a cardboard.
renameCardboard(gridId: string, name: string) → Promise<void> tintero.boards.renamePlotGrid() #
Renames a plot grid.
renamePlotGrid(gridId: string, name: string) → Promise<void> tintero.boards.renamePlotGridColumn() #
Renames a column.
renamePlotGridColumn(gridId: string, columnId: string, name: string) → Promise<void> tintero.boards.setCardboardHeader() #
Labels a row or a column (an act, a character arc). An empty label removes the header.
setCardboardHeader(gridId: string, axis: 'row' | 'col', index: number, label: string, color?: string) → Promise<void> tintero.boards.setCardboardHeadersVisibility() #
Shows or hides the row and/or column headers of a cardboard. What is left out stays. Returns what is visible now.
setCardboardHeadersVisibility(gridId: string, visibility: { rows?: boolean; columns?: boolean }) → Promise<{ rows: boolean; columns: boolean }> tintero.boards.setPlotGridCell() #
Sets the cell of a column and a row, creating it if needed. A chapter cell only fits in the
chapters column (position 0) and needs the chapter id in referenceId; a note cell fits anywhere else.
setPlotGridCell(gridId: string, columnId: string, rowIndex: number, cell: { type: 'unassigned' | 'chapter' | 'note'; referenceId?: string; content?: string; color?: string }) → Promise<PlotGridCell> tintero.boards.updateCardboardCell() #
Changes the title, status, tags or color of a card. Other fields are ignored.
updateCardboardCell(gridId: string, cellId: string, patch: { title?: string; status?: string; tags?: string[]; color?: string }) → Promise<CardboardCell> tintero.boards.updateCardboardNote() #
Change the title, text, colour or tick of a note on a card. What is left out stays.
updateCardboardNote(gridId: string, cellId: string, noteId: string, changes: CardboardNoteChanges) → Promise<CardboardCell> tintero.boards.updatePlotGridRowNote() #
Changes the text, color or height of a banner.
updatePlotGridRowNote(gridId: string, noteId: string, changes: { content?: string; color?: string; height?: number }) → Promise<void> tintero.fs
Delete a file from the project directory (relative path).
deleteProjectFile(location: string) → Promise<void> tintero.fs.getPlatform() #
Get the current platform as a compound string: "<os> | <runtime>".
Examples: "darwin | Desktop", "win32 | Desktop", "linux | Desktop",
"ios | Mobile", "android | Mobile", "unknown | Web".
getPlatform() → Promise<string> Read a file from the project directory (relative path).
readProjectFile(location: string) → Promise<string | null> Save the project metadata to disk.
saveProject() → Promise<void> Write a file to the project directory (relative path).
writeProjectFile(location: string, content: string) → Promise<void> tintero.ui
Close the plugin's open dialog.
closeDialog() → Promise<void> Hide the application sidebar.
hideSidebar() → Promise<void> Check if the application is currently in fullscreen mode.
isFullscreen() → Promise<boolean> Open a modal dialog for this plugin.
openDialog(options?: DialogOptions) → Promise<void> tintero.ui.render() #
Render HTML into the active context. If a dialog is open for this plugin, renders into the dialog. Otherwise, renders into the sidebar panel's #plugin-root.
render(html: string) → Promise<void> tintero.ui.showNotification() #
Show a toast notification.
showNotification(message: string, type?: NotificationType, durationMs?: number) → Promise<void> Show the application sidebar.
showSidebar() → Promise<void> Toggle fullscreen mode (Desktop only).
toggleFullscreen() → Promise<void> Toggle the application sidebar visibility.
toggleSidebar() → Promise<void> tintero.storage
Get a stored value by key. Returns null if not found.
get(key: string) → Promise<any | null> Get all stored key-value pairs.
getAll() → Promise<Record<string, any>> Remove a stored key.
remove(key: string) → Promise<void> Store a value. Values are JSON-serializable.
set(key: string, value: any) → Promise<void> tintero.settings
tintero.app
tintero.app.getSettings() #
Get a sanitized copy of application settings (AI credentials excluded).
getSettings() → Promise<AppSettings> tintero.app.getSettingsField() #
Get a specific setting field by dot path (e.g. "generalSettings.languageIsoCode").
getSettingsField(path: string) → Promise<any | null> tintero.app.updateSettings() #
Modify application settings. Allowed sections: generalSettings, trophySettings, hideSettings, editorSettings, editorToolbarSettings. AI settings cannot be modified.
updateSettings(changes: Partial<Pick<AppSettings, 'generalSettings' | 'trophySettings' | 'hideSettings' | 'editorSettings' | 'editorToolbarSettings'>>) → Promise<void> tintero.backup
tintero.backup.create() #
Create a backup. Returns the backup ID. Keep it to find the backup later.
name becomes the user-visible label (empty or blank = no label); the entry's name is an
internal folder id, so list().find(b => b.name === name) no longer finds it.
create(name?: string, observations?: string) → Promise<string> tintero.backup.getById() #
Get a specific backup by ID.
getById(id: string) → Promise<BackupEntry | null> tintero.backup.getFileContent() #
The stored text (ProseMirror JSON) of ONE chapter or document in a backup, even if it was deleted
from the project since. Scopes: backup.list and project.read.fileContent.
getFileContent(id: string, itemId: string) → Promise<string> tintero.backup.list() #
List all backups.
list() → Promise<BackupEntry[]> tintero.backup.restore() #
Restore a backup. WARNING: This replaces the current project data.
restore(id: string) → Promise<void> tintero.backup.restoreFile() #
DESTRUCTIVE: put back ONE chapter or document from a backup over the current text. The text it
replaces is kept in the file's own history. Scope: backup.restore.
restoreFile(id: string, itemId: string) → Promise<BackupFileRestoreResult> tintero.backup.update() #
Change the visible label and/or the observations of a backup. Its content never changes. Scope: backup.create.
update(id: string, changes: BackupUpdate) → Promise<BackupEntry | null> tintero.events
tintero.export
tintero.export.exportFile() #
Trigger a file download to the user's device.
exportFile(fileName: string, content: string, mimeType?: string) → Promise<void> tintero.export.registerBookExporter() #
Register this plugin as a book exporter (all files concatenated).
registerBookExporter(config: BookExporterConfig) → Promise<void> tintero.export.registerExporter() #
Register this plugin as a file exporter. The convert function is called when the user exports.
registerExporter(config: FileExporterConfig) → Promise<void> tintero.export.registerProjectExporter() #
Register this plugin as a project exporter.
registerProjectExporter(config: ProjectExporterConfig) → Promise<void> tintero.import
tintero.import.registerImporter() #
Register this plugin as a file importer. The convert function receives raw file data.
registerImporter(config: FileImporterConfig) → Promise<void> tintero.import.registerProjectImporter() #
Register this plugin as a project importer.
registerProjectImporter(config: ProjectImporterConfig) → Promise<void> tintero.editor
Live editor state: active document, open tabs, text selection, and write operations.
tintero.editor.getActiveDocument() #
Get the currently active/focused document, or null if no editor is open.
getActiveDocument() → Promise<OpenDocument | null> tintero.editor.getOpenDocuments() #
Get all documents currently open in editor tabs.
getOpenDocuments() → Promise<OpenDocument[]> tintero.editor.getSelection() #
Get the current text selection in the active editor. Returns null if no editor is open. Positions are ProseMirror document positions (use with insertAt/replaceRange).
getSelection() → Promise<EditorSelection | null> tintero.editor.getWordCount() #
Get the word count of the active document. Returns 0 if no editor is open.
getWordCount() → Promise<number> tintero.editor.insertAt() #
Insert HTML content at a specific position in the active editor.
insertAt(position: number, html: string) → Promise<void> tintero.editor.insertFlowMap() #
Insert a read-only block showing one of the project's flow maps.
insertFlowMap(flowMapId: string, position?: number, target?: FlowMapTarget) → Promise<void> tintero.editor.open() #
Open an item of the project in Tintero, as if the user had clicked it in the file tree.
If it is already open, its tab becomes the active one.
Works with the ids of documents, characters, worldbuilding elements, images, audio and PDFs:
the id alone identifies the kind, so there is no type to pass.
It takes the user to the editor. Called from an app view, that view is hidden, not
destroyed: it keeps running and its state is intact if the user comes back within 10 minutes
(and without opening another project in between).
Rejects if nothing in the open project has that id, and when called from an app view the
user has left (hidden): a view nobody is looking at cannot move them elsewhere.
open(id: string) → Promise<void> tintero.editor.replaceRange() #
Replace a range of content in the active editor.
replaceRange(from: number, to: number, html: string) → Promise<void> tintero.editor.replaceSelection() #
Replace the current selection with HTML content. If the selection is empty (cursor only), inserts at the cursor position.
replaceSelection(html: string) → Promise<void> tintero.editor.replaceText() #
Find a LITERAL piece of visible text in a chapter or document (open or not) and replace it,
without rewriting the rest. Scope: project.write.fileContent (not editor.write).
The match is case-sensitive unless matchCase: false, may cross formatting marks (bold in the
middle) but never a paragraph boundary or line break. The new text takes the marks of the FIRST
matched character. An empty replace deletes. With expectedCount that does not match, nothing
is changed and the occurrences come back. No occurrence at all rejects. With annotate, a note
with the previous text (or your string) is left on each new text in YOUR annotation layer.
replaceText(input: ReplaceTextInput) → Promise<ReplaceTextResult> tintero.annotations
Marks and a 0-10 reading over the author's text, in the annotations panel. Never edits the text.
tintero.annotations.add() #
Adds to your layer. A general given replaces the old one; the original signature stays.
add(documentId: string | null, pass: AnnotationPassInput) → Promise<AnnotationWriteResult> tintero.annotations.clear() #
Removes your layer (by name; without it, your default one). The text is not touched.
clear(documentId?: string | null, layer?: string | null) → Promise<void> tintero.annotations.get() #
One layer of a document, or null if it has none. layer: the id of any layer (from
listLayers, also someone else's) or the name of one of yours. Without it, your default layer.
get(documentId?: string | null, layer?: string | null) → Promise<AnnotationPass | null> tintero.annotations.listLayers() #
The layers of a document, whoever launched them. Scope: annotations.read only.
listLayers(documentId?: string | null) → Promise<AnnotationLayerInfo[]> tintero.annotations.remove() #
Removes single annotations from your layer, by their number in the panel (open document only;
read it with get) or by their exact quote. Whatever is left stays; an emptied layer disappears.
remove(documentId: string | null, which: { numbers?: number[]; quotes?: string[]; layer?: string }) → Promise<{ removed: number; remaining: number }> tintero.annotations.set() #
Replaces your layer. Other layers (also Tintero's AI) are not touched. Rejects if there is nothing to write.
set(documentId: string | null, pass: AnnotationPassInput) → Promise<AnnotationWriteResult> tintero.citations
Project sources, citations in the text, and source providers such as Zotero.
tintero.citations.addSource() #
Rejects without a title. With externalId, an existing one from you is updated and keeps its id.
addSource(source: SourceInput) → Promise<Source> tintero.citations.generateBibliography() #
Writes the bibliography chapter: creates it at the end of the manuscript, or REWRITES the one there
was. The style becomes the project's. scope: cited (default) or all sources. Also needs project.write.files.
generateBibliography(options?: { style?: 'apa7' | 'chicago-author-date'; scope?: 'cited' | 'all' }) → Promise<{ fileId: string; created: boolean; entries: number; style: string }> tintero.citations.getCitationSettings() #
The citation style of the project, the styles there are and the bibliography chapter, if it still exists.
getCitationSettings() → Promise<{ style: string; styles: string[]; bibliographyFileId: string | null }> tintero.citations.getCitations() #
The citations of one chapter, or of the whole manuscript without fileId.
getCitations(fileId?: string | null) → Promise<Citation[]> tintero.citations.getSource() #
getSource(sourceId: string) → Promise<Source | null> tintero.citations.getSources() #
getSources() → Promise<Source[]> tintero.citations.insertCitation() #
Puts a citation at the cursor of the active document. False if no text document is open.
insertCitation(sourceId: string, locator?: string | null) → Promise<boolean> tintero.citations.registerProvider() #
Become the project's source provider. One per plugin; registering again replaces it.
registerProvider(provider: CitationProvider) → Promise<void> tintero.citations.removeSource() #
Its citations stay in the text and show as "(deleted source)" until the author fixes them.
removeSource(sourceId: string) → Promise<boolean> tintero.citations.updateCitationSettings() #
Changes the style and/or which chapter is the bibliography (the next generation rewrites it).
updateCitationSettings(changes: { style?: 'apa7' | 'chicago-author-date'; bibliographyFileId?: string }) → Promise<{ style: string; styles: string[]; bibliographyFileId: string | null }> tintero.citations.updateSource() #
Changes the bibliographic fields; id and the provider fields cannot change. False if the title would be empty.
updateSource(sourceId: string, changes: Partial<SourceInput>) → Promise<boolean> tintero.debug
tintero.debug.clear() #
Clear the console log buffer.
clear() → Promise<void> tintero.debug.getLogs() #
Get all stored console log entries. Requires debug.console scope.
getLogs() → Promise<ConsoleEntry[]> tintero.convert
Stateless format converters between ProseMirror JSON, HTML, Markdown, and plain text.
tintero.convert.fromHtml() #
Convert HTML to ProseMirror JSON.
Supports standard HTML elements: <p>, <h1>–<h6>, <strong>,
<em>, <a>, <ul>, <ol>, <blockquote>, <code>, <table>, etc.
fromHtml(html: string) → Promise<ProseMirrorDocument> tintero.convert.fromMarkdown() #
Convert Markdown to ProseMirror JSON. Parses standard Markdown syntax (headings, bold, italic, links, lists, code blocks).
fromMarkdown(markdown: string) → Promise<ProseMirrorDocument> tintero.convert.fromText() #
Convert plain text to ProseMirror JSON. Each line becomes a paragraph node.
fromText(text: string) → Promise<ProseMirrorDocument> tintero.convert.toHtml() #
Convert ProseMirror JSON to clean HTML.
Returns HTML fragment (no <html>/<body> wrapper).
Supports headings, paragraphs, lists, bold, italic, links, images.
Accepts a parsed ProseMirrorDocument object or a raw JSON string.
toHtml(json: ProseMirrorDocument | string) → Promise<string> tintero.convert.toMarkdown() #
Convert ProseMirror JSON to Markdown.
Uses ATX-style headings (#), bold, *italic*, [links](url).
Accepts a parsed ProseMirrorDocument object or a raw JSON string.
toMarkdown(json: ProseMirrorDocument | string) → Promise<string> tintero.convert.toText() #
Convert ProseMirror JSON to plain text.
Extracts text content, discarding all formatting.
Accepts a parsed ProseMirrorDocument object or a raw JSON string
(as returned by getFileContent()).
toText(json: ProseMirrorDocument | string) → Promise<string> tintero.net
Proxied HTTP access to the hosts declared in `network.domains`.
Perform an HTTP request to an external host (proxied by the host app).
Requires the net.fetch scope and the target host must be listed in
the plugin manifest's network.domains allow-list (the user approves
those domains at install time). Requests to any other host are rejected.
Supports exact hosts and leading-wildcard subdomains (*.example.com).
fetch(url: string, options?: NetFetchOptions) → Promise<NetFetchResponse> tintero.media
Control the host's background media player (public YouTube playback).
tintero.media.getNowPlaying() #
getNowPlaying() → Promise<MediaNowPlaying | null> tintero.media.getState() #
getState() → Promise<'idle' | 'playing' | 'paused' | 'buffering' | 'ended'> tintero.media.next() #
next() → Promise<void> tintero.media.pause() #
pause() → Promise<void> tintero.media.play() #
Play a public YouTube video or playlist (URL or id) in the host's background player.
play(source: string) → Promise<void> tintero.media.previous() #
previous() → Promise<void> tintero.media.resume() #
resume() → Promise<void> tintero.media.setVolume() #
Set the volume, 0–100.
setVolume(volume: number) → Promise<void> tintero.media.stop() #
stop() → Promise<void>