EditorSearchComponent
Defined in: src/obsidian/internals/Components/EditorSearchComponent.d.ts:13
Extends
Section titled “Extends”Properties
Section titled “Properties”app:
App
Defined in: src/obsidian/internals/Components/AbstractSearchComponent.d.ts:15
Reference to the app.
Inherited from
Section titled “Inherited from”containerEl
Section titled “containerEl”containerEl:
HTMLElement
Defined in: src/obsidian/internals/Components/AbstractSearchComponent.d.ts:20
The container element in which the search component exists (i.e. Editor).
Inherited from
Section titled “Inherited from”AbstractSearchComponent
.containerEl
cursor
Section titled “cursor”cursor:
null
|SearchCursor
Defined in: src/obsidian/internals/Components/EditorSearchComponent.d.ts:17
Search cursor for editor, handles search and replace functionality for editor.
editor
Section titled “editor”editor:
Editor
Defined in: src/obsidian/internals/Components/EditorSearchComponent.d.ts:22
Linked editor for search component.
isActive
Section titled “isActive”isActive:
boolean
Defined in: src/obsidian/internals/Components/EditorSearchComponent.d.ts:27
Whether search component is currently rendering.
isReplace
Section titled “isReplace”isReplace:
boolean
Defined in: src/obsidian/internals/Components/EditorSearchComponent.d.ts:32
Whether search component is replacing text (includes ‘Replace’ input field).
replaceInputEl
Section titled “replaceInputEl”replaceInputEl:
HTMLInputElement
Defined in: src/obsidian/internals/Components/AbstractSearchComponent.d.ts:25
Container for the replacement input field.
Inherited from
Section titled “Inherited from”AbstractSearchComponent
.replaceInputEl
scope:
Scope
Defined in: src/obsidian/internals/Components/AbstractSearchComponent.d.ts:30
Keyscope for search component.
Inherited from
Section titled “Inherited from”searchButtonContainerEl
Section titled “searchButtonContainerEl”searchButtonContainerEl:
HTMLElement
Defined in: src/obsidian/internals/Components/AbstractSearchComponent.d.ts:35
Container for all the action buttons.
Inherited from
Section titled “Inherited from”AbstractSearchComponent
.searchButtonContainerEl
searchContainerEl
Section titled “searchContainerEl”searchContainerEl:
HTMLElement
Defined in: src/obsidian/internals/Components/AbstractSearchComponent.d.ts:40
Container for the search component itself.
Inherited from
Section titled “Inherited from”AbstractSearchComponent
.searchContainerEl
searchInputEl
Section titled “searchInputEl”searchInputEl:
HTMLInputElement
Defined in: src/obsidian/internals/Components/AbstractSearchComponent.d.ts:45
Container for the search input field.
Inherited from
Section titled “Inherited from”AbstractSearchComponent
.searchInputEl
Methods
Section titled “Methods”clear()
Section titled “clear()”clear():
void
Defined in: src/obsidian/internals/Components/EditorSearchComponent.d.ts:37
Remove all highlights from editor.
Returns
Section titled “Returns”void
findNext()
Section titled “findNext()”findNext():
void
Defined in: src/obsidian/internals/Components/EditorSearchComponent.d.ts:42
Find next search results from cursor and highlights it.
Returns
Section titled “Returns”void
findNextOrReplace()
Section titled “findNextOrReplace()”findNextOrReplace():
void
Defined in: src/obsidian/internals/Components/EditorSearchComponent.d.ts:47
Replace cursor with replacement string if not null and moves to next search result.
Returns
Section titled “Returns”void
findPrevious()
Section titled “findPrevious()”findPrevious():
void
Defined in: src/obsidian/internals/Components/EditorSearchComponent.d.ts:52
Find previous search results from cursor and highlights it.
Returns
Section titled “Returns”void
getQuery()
Section titled “getQuery()”getQuery():
string
Defined in: src/obsidian/internals/Components/AbstractSearchComponent.d.ts:50
Returns the current search query.
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”AbstractSearchComponent
.getQuery
goToNextInput()
Section titled “goToNextInput()”goToNextInput(
event
):unknown
Defined in: src/obsidian/internals/Components/AbstractSearchComponent.d.ts:55
Switch to the next inputElement.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”AbstractSearchComponent
.goToNextInput
hide()
Section titled “hide()”hide():
void
Defined in: src/obsidian/internals/Components/EditorSearchComponent.d.ts:57
Hide/detaches the search component and removes cursor highlights.
Returns
Section titled “Returns”void
highlight()
Section titled “highlight()”highlight(
ranges
):void
Defined in: src/obsidian/internals/Components/EditorSearchComponent.d.ts:64
Add highlights for specified ranges.
Parameters
Section titled “Parameters”ranges
Section titled “ranges”Returns
Section titled “Returns”void
onAltEnter()
Section titled “onAltEnter()”onAltEnter(
e?
):void
Defined in: src/obsidian/internals/Components/EditorSearchComponent.d.ts:69
Highlights all matches if search element focused.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
onEnter()
Section titled “onEnter()”onEnter(
event
):unknown
Defined in: src/obsidian/internals/Components/AbstractSearchComponent.d.ts:60
Invokes findNextOrReplace.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”AbstractSearchComponent
.onEnter
onModAltEnter()
Section titled “onModAltEnter()”onModAltEnter(
e?
):void
Defined in: src/obsidian/internals/Components/EditorSearchComponent.d.ts:74
Replace all search results with specified text if replace mode and replacement element is focused.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
onSearchInput()
Section titled “onSearchInput()”onSearchInput():
void
Defined in: src/obsidian/internals/Components/EditorSearchComponent.d.ts:79
Updates search cursor on new input query and highlights search results.
Returns
Section titled “Returns”void
onShiftEnter()
Section titled “onShiftEnter()”onShiftEnter(
event
):unknown
Defined in: src/obsidian/internals/Components/AbstractSearchComponent.d.ts:65
Invokes findPrevious.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”AbstractSearchComponent
.onShiftEnter
replaceAll()
Section titled “replaceAll()”replaceAll():
void
Defined in: src/obsidian/internals/Components/EditorSearchComponent.d.ts:84
Replaces all search results with replacement query.
Returns
Section titled “Returns”void
replaceCurrentMatch()
Section titled “replaceCurrentMatch()”replaceCurrentMatch():
void
Defined in: src/obsidian/internals/Components/EditorSearchComponent.d.ts:89
Replace current search result, if any, with replacement query.
Returns
Section titled “Returns”void
searchAll()
Section titled “searchAll()”searchAll():
void
Defined in: src/obsidian/internals/Components/EditorSearchComponent.d.ts:94
Find all matches of search query and highlights them.
Returns
Section titled “Returns”void
show()
Section titled “show()”show(
replace
):void
Defined in: src/obsidian/internals/Components/EditorSearchComponent.d.ts:99
Reveal the search (and replace) component.
Parameters
Section titled “Parameters”replace
Section titled “replace”boolean
Returns
Section titled “Returns”void