Skip to content

Commit

Permalink
New version 4.0.12 Read more https://github.com/xdan/jodit/blob/main/…
Browse files Browse the repository at this point in the history
  • Loading branch information
xdan committed Feb 29, 2024
1 parent 61d0bcf commit 0286713
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jodit",
"version": "4.0.11",
"version": "4.0.12",
"description": "Jodit is awesome and usefully wysiwyg editor with filebrowser",
"main": "build/jodit.min.js",
"types": "./types/index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/search/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ declare module 'jodit/config' {
Config.prototype.useSearch = true;
Config.prototype.search = {
lazyIdleTimeout: 0,
useCustomHighlightAPI: typeof Highlight !== 'undefined'
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
useCustomHighlightAPI: typeof window.Highlight !== 'undefined'
};

Icon.set('search', searchIcon);
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/search/helpers/highlight-text-ranges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export function highlightTextRanges(

if (
jodit.o.search.useCustomHighlightAPI &&
typeof Highlight !== 'undefined'
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
typeof window.Highlight !== 'undefined'
) {
const ranges = [rng, ...restRanges].map(rng => {
const range = jodit.selection.createRange();
Expand Down

0 comments on commit 0286713

Please sign in to comment.