Search inside editor
Search plugin. it is used for custom search in text
Disable plugin:
Jodit.make('#editor', {
useSearch: false
});
or
Jodit.make('#editor', {
disablePlugins: 'search'
});
Find and select some text
const editor = Jodit.make('#editor');
editor.value = '<p>this text contains some text</p>';
editor.e.fire('search', 'some text').then(() => {
console.log('Selected!');
});
Find next fragment
const editor = Jodit.make('#editor');
editor.value = '<p>this text thow times contains some text and some text</p>';
editor.e.fire('searchNext', 'some text').then(() => {
console.log('Selected!');
editor.e.fire('searchNext', 'some text');
});
Classes
Interfaces
clearNativeSelection
clearNativeSelection(jodit
): void
Parameters
Name | Type |
---|---|
jodit |
IJodit |
Returns
void
Defined in
jodit/src/plugins/search/helpers/highlight-text-ranges.ts:147