Element: <oj-highlight-text>

Oracle® JavaScript Extension Toolkit (JET)
17.1.0

G12196-01

Since:
  • 9.1.0
Module:
  • ojhighlighttext

Note: This component is in maintenance mode. Suggested alternative: <oj-c-highlight-text>. For help updating an existing application, see the migration section.

QuickNav

Attributes

Other Topics


JET Highlight Text

Description: JET Highlight Text renders text with highlighting applied.

JET Highlight Text renders a text string with highlighting applied to the given text to match.

A Highlight Text can be created with the following markup.


<oj-highlight-text
  text='My text to apply highlighting to.'
  match-text='igh'>
</oj-highlight-text>

Migration

Read about current Core Pack limitations to decide when to migrate.
Please make note of the following:

To migrate from oj-highlight-text to oj-c-highlight-text, you need to revise the import statement and references to oj-c-highlight-text in your app.


Usage

Signature:

interface HighlightTextElement

Typescript Import Format
//To typecheck the element APIs, import as below.
import { HighlightTextElement } from "ojs/ojhighlighttext";

//For the transpiled javascript to load the element's module, import as below
import "ojs/ojhighlighttext";

For additional information visit:

Note: Application logic should not interact with the component's properties or invoke its methods until the BusyContext indicates that the component is ready for interaction.


Attributes

match-text :string

The text string to match.
Default Value:
  • ''
Names
Item Name
Property matchText
Property change event matchTextChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-match-text-changed

text :string

The text string to apply highlighting to.
Default Value:
  • ''
Names
Item Name
Property text
Property change event textChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-text-changed

Methods

getProperty(property) : {any}

Retrieves a value for a property or a single subproperty for complex properties.
Parameters:
Name Type Description
property string The property name to get. Supports dot notation for subproperty access.
Returns:
Type
any

setProperties(properties) : {void}

Performs a batch set of properties.
Parameters:
Name Type Description
properties Object An object containing the property and value pairs to set.
Returns:
Type
void

setProperty(property, value) : {void}

Sets a property or a single subproperty for complex properties and notifies the component of the change, triggering a [property]Changed event.
Parameters:
Name Type Description
property string The property name to set. Supports dot notation for subproperty access.
value any The new value to set the property to.
Returns:
Type
void