Frameworks
Integrations
Mendix
SharePoint
Default UI
Modular UI
AnnotationManager
Annotation Types
Customize
Version 11
Version 10
v10.12
v10.11
v10.10
v10.9
v10.8
v10.7
v10.6
v10.5
v10.4
v10.3
v10.2
v10.1
v10.0
Version 8
v8.12
v8.11
v8.10
v8.9
v8.8
v8.7
v8.6
v8.5
v8.4
v8.3
v8.2
v8.1
v8.0
Version 7
Version 6
v6.3
v6.2
v6.1
v6.0
Version 5
Version 4
Version 3
Version 2
WebViewer Server
WebViewer BIM
WebViewer UI has a built-in search panel and provides an API for controlling the search UI. Launch Demo to see WebViewer search. The following functions can be used to interact with the text search:
addSearchListener
: Add a function that is called whenever there is a match or when finishing a full search.removeSearchListener
: Remove a search callback function.searchText
: Search and highlight the first instance of a search term. Can be called more than once to search for the next instance.searchTextFull
: Search for all instances of a search term. This will also bring up the search sidebar shown in the image below.The following is an example of searchTextFull
being used to search text and adding a searchListener
callback to create annotations on top of the results.
After the document been loaded, a searchListener
callback function is added and searchTextFull
is used to search the document. When calling searchTextFull
, the searchListener
callback is invoked once and receives an array of all the results (even if nothing was found). When using the searchText
method, the 'searchListener' callback will only be invoked if a result was found.
When the searchListener
callback function is called, it'll receive the searchPattern
and options
used for the search and an array containing ofSearchResults
objects. In the above example, it creates redaction annotations on top of the matching text to illustrate how SearchResults
objects can be used.
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales