obsidian APIs
- Plugin
- PluginSettingTab
- Setting
- App
- TFile
- Notice
- MarkdownView
- Modal
- Editor
- Vault
- addIcon
- WorkspaceLeaf
- TFolder
- TAbstractFile
- MarkdownPostProcessorContext
- Platform
- Menu
- normalizePath
- FuzzySuggestModal
- ButtonComponent
- FuzzyMatch
- MarkdownRenderer
- debounce
- TextComponent
- EditorPosition
- ItemView
- moment
- request
- DropdownComponent
- TextAreaComponent
- FileSystemAdapter
- CachedMetadata
- Scope
- MetadataCache
- ToggleComponent
- MarkdownRenderChild
- SuggestModal
- setIcon
- HeadingCache
- getAllTags
- EditorSuggest
- EditorSuggestContext
- EditorSuggestTriggerInfo
- FrontMatterCache
- FileView
- Component
- parseYaml
- Workspace
- LinkCache
- editorViewField
- EventRef
- View
- PluginManifest
- Pos
- Debouncer
- requestUrl
- ExtraButtonComponent
- MarkdownPostProcessor
- DataAdapter
- ListedFiles
- parseLinktext
- MenuItem
- ISuggestOwner
- OpenViewState
- FileManager
- ObsidianProtocolData
- Events
- SearchComponent
- ViewState
- renderResults
- Command
- Keymap
- Loc
- TagCache
- SearchMatches
- EmbedCache
- parseFrontMatterTags
- AbstractTextComponent
- Point
- MarkdownPreviewRenderer
- getLinkpath
- requireApiVersion
- resolveSubpath
- EditorRangeOrCaret
- EditorTransaction
- FolderItem
- ClipboardManager
- DragManager
- FileExplorerView
- AFItem
- Modifier
- EditorRange
- FileStats
- finishRenderMath
- loadMathJax
- renderMath
- fuzzySearch
- InstalledPlugin
- InternalPlugins
- prepareQuery
- CommandPalettePluginInstance
- PreparedQuery
- WorkspaceItem
- WorkspaceSplit
- ViewRegistry
- SearchResult
- StarredPluginInstance
- FileStarredItem
- StarredPluginItem
- ReferenceCache
- WorkspacesPluginInstance
- sortSearchResults
- SearchStarredItem
- Plugin_2
- QuickSwitcherOptions
- QuickSwitcherPluginInstance
- Chooser
- Hotkey
- KeymapContext
- KeymapEventListener
- RequestUrlResponse
- MarkdownPreviewView
- PopoverSuggest
- BlockCache
- stringifyYaml
- UserEvent
- renderMatches
- SearchMatchPart
- TextFileView
- ViewStateResult
- htmlToMarkdown
- MomentFormatComponent
- RequestUrlParam
- EditorSelection
- EditorSelectionOrCaret
- editorLivePreviewField
Other Related APIs
obsidian#Point TypeScript Examples
The following examples show how to use
obsidian#Point.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: contextMenu.ts From obsidian-todoist-plugin with MIT License | 6 votes |
export function showTaskContext(
app: App,
taskCtx: TaskContext,
position: Point
) {
new Menu(app)
.addItem((menuItem) =>
menuItem
.setTitle("Complete task")
.setIcon("check-small")
.onClick(async () => taskCtx.onClickTask(taskCtx.task))
)
.addItem((menuItem) =>
menuItem
.setTitle("Open task in Todoist (app)")
.setIcon("popup-open")
.onClick(() => {
openExternal(`todoist://task?id=${taskCtx.task.id}`);
})
)
.addItem((menuItem) =>
menuItem
.setTitle("Open task in Todoist (web)")
.setIcon("popup-open")
.onClick(() =>
openExternal(
`https://todoist.com/app/project/${taskCtx.task.projectID}/task/${taskCtx.task.id}`
)
)
)
.showAtPosition(position);
}
Example #2
Source File: fileMenu.ts From obsidian-calendar-plugin with MIT License | 6 votes |
export function showFileMenu(app: App, file: TFile, position: Point): void {
const fileMenu = new Menu(app);
fileMenu.addItem((item) =>
item
.setTitle("Delete")
.setIcon("trash")
.onClick(() => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(<any>app).fileManager.promptForFileDeletion(file);
})
);
app.workspace.trigger(
"file-menu",
fileMenu,
file,
"calendar-context-menu",
null
);
fileMenu.showAtPosition(position);
}