Search inside editor

Search plugin. it is used for custom search in text
search

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

In this article: