Jodit - Best WYSIWYG Editor for You
Selection by triple click removes close tag + open tag of next paragraph #1101
Added options select.normalizeTripleClick: boolean = true
to normalize selection after triple click
For disable this behavior set select.normalizeTripleClick: false
Jodit.make('#editor', {
select: {
normalizeTripleClick: false
}
});
Before:
import watch, { watch as watch2 } from 'jodit/core/decorators/watch/watch';
Now only:
import { watch } from 'jodit/core/decorators/watch/watch';
AbortError
to the Jodit.modules
namespace. This is a custom error that is thrown when the user cancels the operation.const jodit = Jodit.make('#editor');
jodit.async
.promise((res, rej) => fetch('./test.php').then(res).catch(rej))
.catch(error => {
if (Jodit.modules.Helpers.isAbortError(error)) {
console.log('Operation was aborted');
}
});
jodit.destruct();
@tsconfig/node18 ^18.2.2 → ^18.2.4
@types/node ^20.11.25 → ^20.12.2
@typescript-eslint/eslint-plugin ^7.1.1 → ^7.5.0
@typescript-eslint/parser ^7.1.1 → ^7.5.0
autoprefixer ^10.4.18 → ^10.4.19
axios ^1.6.7 → ^1.6.8
core-js ^3.36.0 → ^3.36.1
cssnano-preset-advanced ^6.1.0 → ^6.1.2
eslint-plugin-mocha ^10.4.0 → ^10.4.1
glob ^10.3.10 → ^10.3.12
mocha ^10.3.0 → ^10.4.0
open ^10.0.4 → ^10.1.0
postcss >=8.4.35 → >=8.4.38
stylelint ^16.2.1 → ^16.3.1
typescript ^5.4.2 → ^5.4.3
webpack 5.90.3 → 5.91.0
webpack-dev-middleware ^7.0.0 → ^7.2.0
webpack-dev-server ^5.0.2 → ^5.0.4
@types/node ^20.10.7 → ^20.11.25
@typescript-eslint/eslint-plugin ^6.18.0 → ^7.1.1
@typescript-eslint/parser ^6.18.0 → ^7.1.1
autoprefixer ^10.4.16 → ^10.4.18
axios ^1.6.5 → ^1.6.7
core-js ^3.35.0 → ^3.36.0
css-loader ^6.8.1 → ^6.10.0
css-minimizer-webpack-plugin ^5.0.1 → ^6.0.0
cssnano-preset-advanced ^6.0.3 → ^6.1.0
eslint ^8.56.0 → ^8.57.0
eslint-plugin-mocha ^10.2.0 → ^10.4.0
eslint-plugin-prettier ^5.1.2 → ^5.1.3
karma ^6.4.2 → ^6.4.3
karma-firefox-launcher ^2.1.2 → ^2.1.3
less-loader ^11.1.4 → ^12.2.0
mini-css-extract-plugin ^2.7.6 → ^2.8.1
mocha ^10.2.0 → ^10.3.0
node-jq ^4.2.2 → ^4.3.1
open ^10.0.3 → ^10.0.4
postcss >=8.4.33 → >=8.4.35
postcss-loader ^7.3.4 → ^8.1.1
prettier ^3.1.1 → ^3.2.5
style-loader ^3.3.3 → ^3.3.4
stylelint ^16.1.0 → ^16.2.1
typescript ^5.3.3 → ^5.4.2
webpack 5.89.0 → 5.90.3
webpack-dev-server ^4.15.1 → ^5.0.2
webpack-hot-middleware ^2.26.0 → ^2.26.1
beforeInit
hook. If the hook returned a promise, and the editor was destroyed after that,
then after resolving the promise, the editor continued the initialization proceduresearch.useCustomHighlightAPI
option to the "Search" plugin to use the built-in text highlighting API https://developer.mozilla.org/en-US/docs/Web/API/CSS_Custom_Highlight_API
If the browser does not support this API, then standard text highlighting will be used by wrapping it in the <span jd-tmp-selection>
tag.All static methods of the Jodit.modules.Table
module have been removed and replaced with methods of an instance of the Table
class with the same name.
const jodit = Jodit.make('#editor');
// Before
Jodit.modules.Table.mergeSelected(jodit.editor.firstChild, jodit);
// Now
jodit.getInstance('Table').mergeSelected(jodit.editor.firstChild);
.jodit-filebrowser
class prefix was renamed to .jodit-file-browser
CSS key --color-background-filebrowser-folders
was removed from global scope.
Removed deprecated selection.applyStyle method
Changed Create.sandbox signature to return body,iframe tuple
In the plugin system, the requires field has been removed from instances, only the field in the constructor has been left
class somePlugin extends Jodit.modulules.Plugin {
static requires = ['hotkeys']; // It still works
requires = ['hotkeys']; // Now it does not work
}
Deprecated were removed
Dom.isTag
does not support array
Select.applyStyle
method was removed
history.observer
was removed
editorCssClass
removed
wrapNodes.exclude
changed from array to set
allowResizeTags
changed from array to set
resizer.useAspectRatio
changed from array to set
All css variables renamed to kebab-case
Remove all languages from lang/index.js for ESM build
Only base plugins list in plugins/index.js for ESM build
Remove polyfills from ESM build
Remove composer.json
!!! Build files removed from repository and only available in npm package !!!
!!! bowers.json was removed !!!
server.js was removed
All build js files was rewritten to typescript
build-system
was renamed as tools
Removed exludeLangs
build option. Instead use --includeLanguages=en
option.
Default target for build was changed to es2015
Build in es2018 target was removed, instead es2021 was added
Event getIcon
was removed. Use option getIcon
instead
Jodit.make('#editor', {
getIcon: (name: string, clearName: string) => {
if (name === 'bold') {
return '<svg>...</svg>';
}
return null;
}
});
Removed errorMessage
event. Use module.messages
instead
Jodit.make('#editor').message.info('Hello world');
Removed Jodit.modules.Helpers.val
method
Improved UX of dialog boxes. Added two options closeOnEsc
defaulting to true
and closeOnClickOverlay
defaulting to false
.
Jodit.make('#editor', {
dialog: {
closeOnEsc: true,
closeOnClickOverlay: false
}
});
// or
const editor = Jodit.make('#editor');
editor.alert('Hello world'); // closeOnEsc = true, closeOnClickOverlay = true
editor
.dlg({
closeOnEsc: false,
closeOnClickOverlay: true
})
.open();
The Jodit.getInstance
method can accept a module constructor instead of its name:
const jodit = Jodit.make('#editor');
const table = jodit.getInstance(Jodit.modules.Table);
const table2 = jodit.getInstance('Table'); // It still works
console.log(table === table2); // true
Even though I disable some editor plugins, they are displayed on mobile #243
Introduced the pasteExcludeStripTags option. This is a list of tags that won't be removed from the pasted HTML
when in INSERT_AS_TEXT mode. By default, it includes ['br', 'hr']
.
See https://github.com/xdan/jodit/issues/1033 for more details.
Jodit.make('#editor', {
pasteExcludeStripTags: ['br', 'style']
});
copy pasting twitter or istagram or etc not as expected #1032
When cursor is not in view and paste is done, editor doesn't scroll to the pasted content automatically #983 Added scrollToPastedContent
After inserting the HTML, the cursor will be inserted inside the block element
Added Jodit.modules.Dom.isList
method
Added Jodit.modules.Dom.isLeaf
method
Added plugin delete
for correct delete content with command delete
Folder rename not working if "space" is added in folder name #1054
Fixed the logic of the file upload module. When HTTP errors were simply ignored.
Fixed a bug with the editor.selection.setCursorIn(box)
method, which could set the cursor inside a
.
Issues with ESM #1029, icons were not included in the esm build Issue: https://github.com/xdan/jodit/issues/1029
Use node 18.17.1 for build
Fixed a bug where the cursor, when positioned at the start of the h1 tag and a style was applied to the h1 tag, would move up one tag level.
Fixed an issue where the inline popup was not hidden after deleting an image
@types/ace ^0.0.50 → ^0.0.52
@types/fs-extra ^11.0.3 → ^11.0.4
@types/karma ^6.3.6 → ^6.3.8
@types/node ^20.8.7 → ^20.10.3
@types/postcss-css-variables ^0.18.2 → ^0.18.3
@types/yargs ^17.0.29 → ^17.0.32
@typescript-eslint/eslint-plugin ^6.8.0 → ^6.13.2
@typescript-eslint/parser ^6.8.0 → ^6.13.2
axios ^1.5.1 → ^1.6.2
core-js ^3.33.1 → ^3.34.0
eslint ^8.52.0 → ^8.55.0
eslint-config-prettier ^9.0.0 → ^9.1.0
eslint-plugin-import ^2.28.1 → ^2.29.0
node-jq ^4.0.1 → ^4.2.2
postcss >=8.4.31 → >=8.4.32
prettier ^3.0.3 → ^3.1.0
stylelint-prettier ^4.0.2 → ^4.1.0
ts-loader ^9.5.0 → ^9.5.1
typescript ^5.2.2 → ^5.3.2
Fixed a bug in the UITextArea UI component. Instead of adding a textarea element, it was incorrectly adding an input element.
Calls to setTimout without the async module have been removed from autotests, and most of the asynchronous tests have been rewritten from done to async/await
Update dependencies
stylelint-config-idiomatic-order v9.0.0 → v10.0.0
stylelint-config-standard ^34.0.0 → ^36.0.0
stylelint-prettier ^4.1.0 → ^4.4.0
terser-webpack-plugin ^5.3.9 → ^5.3.10
ts-node ^10.9.1 → ^10.9.2
typescript ^5.3.2 → ^5.3.3
webpack-dev-middleware ^6.1.1 → ^7.0.0
webpack-hot-middleware ^2.25.4 → ^2.26.0
@types/node ^18.13.0 → ^18.15.12
@typescript-eslint/eslint-plugin ^5.50.0 → ^5.59.0
@typescript-eslint/parser ^5.50.0 → ^5.59.0
autoprefixer ^10.4.13 → ^10.4.14
axios ^1.3.3 → ^1.3.6
core-js ^3.28.0 → ^3.30.1
css-minimizer-webpack-plugin ^4.2.2 → ^5.0.0
cssnano-preset-advanced ^5.3.9 → ^6.0.0
eslint ^8.34.0 → ^8.38.0
eslint-config-prettier ^8.6.0 → ^8.8.0
expect-mocha-image-snapshot ^3.0.1 → ^3.0.13
glob ^8.1.0 → ^10.2.1
karma-chrome-launcher ^3.1.1 → ^3.2.0
lint-staged ^13.1.2 → ^13.2.1
mini-css-extract-plugin ^2.7.2 → ^2.7.5
postcss >=8.4.21 → >=8.4.23
postcss-css-variables ^0.18.0 → ^0.19.0
postcss-loader ^7.0.2 → ^7.2.4
prettier ^2.8.4 → ^2.8.7
puppeteer ^19.7.0 → ^19.10.0
style-loader ^3.3.1 → ^3.3.2
stylelint ^15.1.0 → ^15.5.0
stylelint-config-standard ^30.0.1 → ^33.0.0
stylelint-prettier ^2.0.0 → ^3.0.0
terser-webpack-plugin ^5.3.6 → ^5.3.7
tsc-alias ^1.8.2 → ^1.8.5
typescript ^4.9.5 → ^5.0.4
webpack 5.76.0 → 5.80.0
webpack-dev-middleware ^6.0.1 → ^6.0.2
webpack-dev-server ^4.11.1 → ^4.13.3
yargs ^17.6.2 → ^17.7.1
core-js ^3.27.2 → ^3.28.0
@types/node ^18.11.19 → ^18.13.0
axios ^1.3.2 → ^1.3.3
eslint ^8.33.0 → ^8.34.0
karma-sourcemap-loader ^0.3.8 → ^0.4.0
lint-staged ^13.1.0 → ^13.1.2
open ^8.4.0 → ^8.4.1
prettier ^2.8.3 → ^2.8.4
puppeteer ^19.6.3 → ^19.7.0
stylelint ^14.16.1 → ^15.1.0
stylelint-config-prettier ^9.0.4 → ^9.0.5
stylelint-config-standard ^29.0.0 → ^30.0.1
synchronous-promise 2.0.15 → 2.0.17
filebrowser.createNewFolder
, filebrowser.editImage
,
filebrowser.deleteFolder
,filebrowser.renameFolder
,filebrowser.moveFolder
,filebrowser.moveFile
were marked as deprecated.filebrowser.permissionsPresets: Partial<IPermissions>
option.Before:
Jodit.make('#editor', {
filebrowser: {
createNewFolder: false,
deleteFolder: false,
renameFolder: false,
moveFolder: false,
moveFile: false,
editImage: false,
ajax: {
url: 'https://xdsoft.net/jodit/finder/'
}
}
});
Now
Jodit.make('#editor', {
filebrowser: {
permissionsPresets: {
allowFiles: false,
allowFileMove: false,
allowFileUpload: false,
allowFileUploadRemote: false,
allowFileRemove: false,
allowFileRename: false,
allowFolders: false,
allowFolderCreate: false,
allowFolderMove: false,
allowFolderRemove: false,
allowFolderRename: false,
allowImageResize: false,
allowImageCrop: false
},
ajax: {
url: 'https://xdsoft.net/jodit/finder/'
}
}
});
core-js ^3.26.1 → ^3.27.2
@types/node ^18.11.9 → ^18.11.19
@typescript-eslint/eslint-plugin ^5.45.0 → ^5.50.0
@typescript-eslint/parser ^5.45.0 → ^5.50.0
axios ^1.2.0 → ^1.3.2
css-loader ^6.7.2 → ^6.7.3
eslint ^8.28.0 → ^8.33.0
eslint-config-prettier ^8.5.0 → ^8.6.0
eslint-plugin-import ^2.26.0 → ^2.27.5
expect-mocha-image-snapshot ^2.0.14 → ^3.0.1
glob ^8.0.3 → ^8.1.0
husky ^8.0.2 → ^8.0.3
lint-staged ^13.0.4 → ^13.1.0
mini-css-extract-plugin ^2.7.0 → ^2.7.2
mocha ^10.1.0 → ^10.2.0
nock ^13.2.9 → ^13.3.0
postcss >=8.4.19 → >=8.4.21
postcss-loader ^7.0.1 → ^7.0.2
prettier ^2.8.0 → ^2.8.3
puppeteer ^19.3.0 → ^19.6.3
stylelint ^14.15.0 → ^14.16.1
synchronous-promise 2.0.15 → 2.0.17
ts-loader ^9.4.1 → ^9.4.2
tsc-alias ^1.7.1 → ^1.8.2
tslib ^2.4.1 → ^2.5.0
typescript ^4.9.3 → ^4.9.5
webpack-cli ^5.0.0 → ^5.0.1
filebrowser.createNewFolder
, filebrowser.editImage
,
filebrowser.deleteFolder
,filebrowser.renameFolder
,filebrowser.moveFolder
,filebrowser.moveFile
were marked as deprecated.filebrowser.permissionsPresets: Partial<IPermissions>
option.Before:
Jodit.make('#editor', {
filebrowser: {
createNewFolder: false,
deleteFolder: false,
renameFolder: false,
moveFolder: false,
moveFile: false,
editImage: false,
ajax: {
url: 'https://xdsoft.net/jodit/finder/'
}
},
});
Now
Jodit.make('#editor', {
filebrowser: {
permissionsPresets: {
allowFiles: false,
allowFileMove: false,
allowFileUpload: false,
allowFileUploadRemote: false,
allowFileRemove: false,
allowFileRename: false,
allowFolders: false,
allowFolderCreate: false,
allowFolderMove: false,
allowFolderRemove: false,
allowFolderRename: false,
allowImageResize: false,
allowImageCrop: false,
},
ajax: {
url: 'https://xdsoft.net/jodit/finder/'
}
},
});
core-js ^3.26.1 → ^3.27.2
@types/node ^18.11.9 → ^18.11.19
@typescript-eslint/eslint-plugin ^5.45.0 → ^5.50.0
@typescript-eslint/parser ^5.45.0 → ^5.50.0
axios ^1.2.0 → ^1.3.2
css-loader ^6.7.2 → ^6.7.3
eslint ^8.28.0 → ^8.33.0
eslint-config-prettier ^8.5.0 → ^8.6.0
eslint-plugin-import ^2.26.0 → ^2.27.5
expect-mocha-image-snapshot ^2.0.14 → ^3.0.1
glob ^8.0.3 → ^8.1.0
husky ^8.0.2 → ^8.0.3
lint-staged ^13.0.4 → ^13.1.0
mini-css-extract-plugin ^2.7.0 → ^2.7.2
mocha ^10.1.0 → ^10.2.0
nock ^13.2.9 → ^13.3.0
postcss >=8.4.19 → >=8.4.21
postcss-loader ^7.0.1 → ^7.0.2
prettier ^2.8.0 → ^2.8.3
puppeteer ^19.3.0 → ^19.6.3
stylelint ^14.15.0 → ^14.16.1
synchronous-promise 2.0.15 → 2.0.17
ts-loader ^9.4.1 → ^9.4.2
tsc-alias ^1.7.1 → ^1.8.2
tslib ^2.4.1 → ^2.5.0
typescript ^4.9.3 → ^4.9.5
webpack-cli ^5.0.0 → ^5.0.1
MAY_BE_REMOVED_WITH_KEY
was replaced on set INSEPARABLE_TAGS
Select.applyStyle
marked as deprecated. Use Select.commitStyle
instead.Before:
jodit.select.applyStyle(
{ color: red },
{
element: 'strong'
}
);
Now:
jodit.s.commitStyle({
element: 'strong',
attributes: {
style: {
color: 'red'
}
}
});
Select
.commitStyle
method, the attributes
property has been added, which allows you to
also set attributes when applying a style.jodit.s.commitStyle({
element: 'a',
attributes: {
href: 'https://stename.ru'
}
});
Wraps the selected text into a link with the specified address.
When inserting a url, if the text is selected, it will automatically be replaced with a link
In Tab plugin allow use shift+tab for lists
IControlType.childExec
Allows you to set a separate handler for list itemsJodit.make('.editor', {
buttons: [
{
name: 'add-date',
iconURL: 'stuf/dummy.png',
list: {
options: 'Open options'
},
exec(editor, current, control) {
editor.s.insertHTML(new Date().toString());
},
childExec(editor, current, control) {
if (control.args[0] === 'options') {
editor.alert('Options');
}
}
}
]
});
IJodit
from first argument of Ajax
constructor.IJodit
interface.
These are just aliases for the same methods and properties of the Select
module.const editor = Jodit.make('#editor');
editor.focus();
IJodit.fetch
method has been added to the IJodit
interface,
which is similar in signature to the fetch
method in the browserconst editor = Jodit.make('#editor');
const data = await editor.fetch('https://somesite.com?type=json');
superscript
and subscript
commands. If the cursor was inside sub or sup tags, then nothing happened.ISnapshot.isBlocked
- is readonly nowIHistory.snapshot
- is readonly nowIHistory.processChanges
and IHistory.upTick
were removed.IHistory.snapshot.isBlocked=true...IHistory.snapshot.isBlocked=false
should be used IHistory.snapshot.transaction(() => {...})
IJodit.registerCommand<C extends string>
- is generic nowIJodit.getNativeEditorValue
- marked as internal, please do not use it in your code.jodit-container
was added background-color: var(--color-background-light-gray);
.jodit-workplace
was added background-color: var(--color-background-default);
Dom.markTemporary
emptyBlockAfterInit=true
option. After the editor is initialized, if it is empty, an empty block will be added to it.core-js ^3.25.5 → ^3.26.0
@types/node ^18.11.0 → ^18.11.9
@typescript-eslint/eslint-plugin ^5.40.0 → ^5.42.0
@typescript-eslint/parser ^5.40.0 → ^5.42.0
autoprefixer ^10.4.12 → ^10.4.13
cssnano-preset-advanced ^5.3.8 → ^5.3.9
eslint ^8.25.0 → ^8.26.0
puppeteer ^19.0.0 → ^19.2.1
replace ^1.2.1 → ^1.2.2
tslib ^2.4.0 → ^2.4.1
yargs ^17.6.0 → ^17.6.1
@types/node ^18.8.3 → ^18.11.0 axios ^1.1.2 → ^1.1.3 css-minimizer-webpack-plugin ^4.2.1 → ^4.2.2 mocha ^10.0.0 → ^10.1.0 postcss >=8.4.17 → >=8.4.18 puppeteer ^18.2.1 → ^19.0.0 stylelint ^14.13.0 → ^14.14.0 stylelint-config-standard ^28.0.0 → ^29.0.0
changed
field in the response.
This is necessary for better caching in the browser.cleanHTML.denyTags
default equal script
Those. script tags are disabled by default. If you need them then turn off this rule:Jodit.make('#editor', {
cleanHTML: {
denyTags: false
}
});
b+meta
, b+ctrl
Now: meta+b
, ctrl+b
This is expressed in the installation of handlers for keyboard shortcuts:Jodit.make('#editor', { disablePlugins: ['bold'] }).e.on('meta+b', () => {
alert('Do smth with text');
return false;
});
assert
calls from production build.core-js ^3.24.1 → ^3.25.5
@types/node ^18.7.3 → ^18.8.3
@typescript-eslint/eslint-plugin ^5.33.0 → ^5.39.0
@typescript-eslint/parser ^5.33.0 → ^5.39.0
autoprefixer ^10.4.8 → ^10.4.12
axios ^0.27.2 → ^1.1.2
css-minimizer-webpack-plugin ^4.0.0 → ^4.2.1
eslint ^8.22.0 → ^8.25.0
eslint-plugin-tsdoc ^0.2.16 → ^0.2.17
express ^4.18.1 → ^4.18.2
karma ^6.4.0 → ^6.4.1
less-loader ^11.0.0 → ^11.1.0
postcss >=8.4.16 → >=8.4.17
puppeteer ^17.0.0 → ^18.2.1
stylelint ^14.10.0 → ^14.13.0
stylelint-config-idiomatic-order v8.1.0 → v9.0.0
stylelint-config-standard ^27.0.0 → ^28.0.0
synchronous-promise ^2.0.15 → ^2.0.16
terser-webpack-plugin ^5.3.4 → ^5.3.6
ts-loader ^9.3.1 → ^9.4.1
typescript ^4.8.2 → ^4.8.4
webpack 5.73.0 → 5.74.0
webpack-dev-server ^4.9.3 → ^4.11.1
webpack-hot-middleware ^2.25.1 → ^2.25.2
yargs ^17.5.1 → ^17.6.0
error-messages
functionality to messages
module.ui/button/tooltip
so that it can be used not only with the editordtd
plugin. Read more
cleanHTML.disableCleanFilter:Set<string>
options. Node filtering rules that do not need to be applied to content
The full list of rules is generated dynamically from the folder
https://github.com/xdan/jodit/tree/master/src/plugins/clean-html/helpers/visitor/filters
allowCommandsInReadOnly:string[]
options. Allow execute commands in readonly mode.
activeButtonsInReadOnly: ['source', 'preview'] is not working. #878
const editor = Jodit.make('#editor', {
readonly: true,
allowCommandsInReadOnly: ['alert']
});
editor.registerCommand('alert', (_, _2, text) => {
alert(text);
});
editor.execCommand('alert', '', 'Hello!');
select.normalizeSelectionBeforeCutAndCopy
now default is falseJodit.make('#editor', {
uploader: {
url: 'https://sitename.net/jodit/connector/index.php?action=fileUpload',
getDisplayName: (_, name) => 'File:' + name
}
});
cleanHTML.useIframeSandbox
:boolean
option(default: false). Use iframe[sandbox] to paste HTML code into the editor to check it for safety.
Allows you not to run scripts and handlers, but it works much slowerwebpack.ids.DeterministicModuleIdsPlugin
for more reliable sharing of exported module names between builds.
Now you can include plugins from 'es5' in the assembly for 'es2018.en'. @types/node ^17.0.36 → ^17.0.41
@typescript-eslint/eslint-plugin ^5.27.0 → ^5.27.1
@typescript-eslint/parser ^5.27.0 → ^5.27.1
cssnano-preset-advanced ^5.3.6 → ^5.3.7
eslint ^8.16.0 → ^8.17.0
lint-staged ^12.4.3 → ^13.0.0
terser-webpack-plugin ^5.3.1 → ^5.3.3
typescript ^4.7.2 → ^4.7.3
webpack ^5.72.1 → ^5.73.0
webpack-dev-server ^4.9.0 → ^4.9.2
core-js ^3.22.7 → ^3.22.8
This plugin is not included in the main Jodit build. It must be connected separately Подробнее
createAttributes
option:Jodit.defaultOptions.createAttributes = {
table: {
style: 'border-collapse:collapse;width: 100%;'
}
};
uploader.processFileName
- The method can be used to change the name of the uploaded fileJodit.make('#editor', {
uploader: {
url: 'some-connector.php',
processFileName: (key, file, name) => {
return [key, file, 'some-prefix_' + name];
}
}
});
Esc
did not close the dialogThe on/one/off methods of the Jodit Event System have been greatly simplified:
instead:
editor.e.on(
'click',
() => {
alert('Clicked!');
},
undefined,
true
);
Now:
editor.e.on(
'click',
() => {
alert('Clicked!');
},
{
top: true
}
);
Also, the methods now support an array of events:
editor.e.on('click mousedown mouseup', () => {
alert('Some event!');
});
editor.e.on(['click', 'mousedown', 'mouseup'], () => {
alert('Some event!');
});
this.j.async
is now this.async
.resizer.useAspectRatio
How to resize image with the handle bars without fixed aspect ratio
applyLink
for issue change default target for all links #841
Instead of a self-written truncated polyfill for Array.from
, the core-js module is used
Moved the test files to the appropriate directories
Update deps
@types/node ^17.0.23 → ^17.0.31
@typescript-eslint/eslint-plugin ^5.19.0 → ^5.22.0
@typescript-eslint/parser ^5.19.0 → ^5.22.0
autoprefixer ^10.4.4 → ^10.4.7
axios ^0.26.1 → ^0.27.2
eslint ^8.13.0 → ^8.14.0
express ^4.17.3 → ^4.18.1
karma ^6.3.17 → ^6.3.19
lint-staged ^12.3.7 → ^12.4.1
mocha ^9.2.2 → ^10.0.0
postcss >=8.4.12 → >=8.4.13
stylelint ^14.6.1 → ^14.8.2
ts-loader ^9.2.8 → ^9.3.0
tslib ^2.3.1 → ^2.4.0
typescript ^4.6.3 → ^4.6.4
webpack-dev-server ^4.8.1 → ^4.9.0
core-js ^3.21.1 → ^3.22.4
Some minifier configurations do not correctly handle inheritance in the component
decorator,
we added some helper code earlier to make this work correctly.
We tried to determine belonging by the name of the component and not by its constructor or prototype.
Because in some build system(ex. create-react-app):
@component
class A extends Component {
className() {
return 'A';
}
}
const a = new A();
a instanceof Component; // false - only in some cases
elm.className() === A.prototype.className(); // true
In most cases, this entailed new bugs, so in 3.17 we decided to remove this heuristic. If something broke in your assembly, please create an issue on github.
insertCursorAfter
argument.const editor = Jodit.make('#editor');
editor.s.insertHTML('test', false);
@typescript-eslint/eslint-plugin ^5.16.0 → ^5.19.0
@typescript-eslint/parser ^5.16.0 → ^5.19.0
cssnano-preset-advanced ^5.3.1 → ^5.3.3
eslint ^8.12.0 → ^8.13.0
eslint-plugin-tsdoc ^0.2.14 → ^0.2.16
prettier ^2.6.1 → ^2.6.2
webpack ^5.70.0 → ^5.72.0
webpack-dev-server ^4.7.4 → ^4.8.1
yargs ^17.4.0 → ^17.4.1
imageProcessor
plugin has added the functionality of replacing data-uri objects in the src
of images with blob-url
.
This allows you to more conveniently work with an HTML document without loading the processor.
Checks if the imageProcessor.replaceDataURIToBlobIdInView
option is enabled then converts image src which has data:base64
to blob-object-uri
In this case, Jodit.value
returns images with data-uri
. And original textarea
itself does the reverse replacement take place.
const editor = Jodit.make('#editor', {
imageProcessor: {
replaceDataURIToBlobIdInView: true // This is the default value, but for examples we set it
}
});
editor.value =
'<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII="/></p>';
console.log(editor.value); // <p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII="/></p>
console.log(editor.getElementValue()); // '<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII="/></p>'
console.log(editor.getNativeEditorValue()); // <p><img src="blob:http://localhost:2000/03377cf0-6260-4351-82ad-8a8901ea104f"></p>
Jodit.setElementValue
marked us deprecated and will be removed in next major release.@types/node ^17.0.21 → ^17.0.23
@typescript-eslint/eslint-plugin ^5.14.0 → ^5.16.0
@typescript-eslint/parser ^5.14.0 → ^5.16.0
autoprefixer ^10.4.2 → ^10.4.4
cssnano-preset-advanced ^5.2.4 → ^5.3.1
eslint ^8.11.0 → ^8.12.0
lint-staged ^12.3.5 → ^12.3.7
postcss >=8.4.8 → >=8.4.12
prettier ^2.5.1 → ^2.6.1
stylelint ^14.5.3 → ^14.6.1
typescript ^4.6.2 → ^4.6.3
yargs ^17.3.1 → ^17.4.0
wait
and debounce
decoratorsspellcheck
plugin.Config.pasteHTMLActionList
and Config.pasteFromWordActionList
options https://github.com/xdan/jodit/issues/802.Jodit.synchronizeValues()
method. The method synchronizes the WYSIWYG values of the editorAsync.throttle
.LazyWalker
LazyWalker
LazyWalker
Jodit.constants
https://github.com/xdan/jodit/issues/806
wrap-text-nodes
plugin to wrap-nodes
spellcheck
= false by default. This is due to the fact that the built-in spell check slows down the editor very much on large tests.@typescript-eslint/explicit-function-return-type
in eslintwatch
decorator, when multiple watchers were set, it used only one contextclean-html
plugin now works via requestIdleCallback
and doesn't slow down the browser