Big refactoring and Bug fix
3.6.1
π Bug Fix
- <style> tag wrapping problem #620
- Disable Link Checking #618
- Changing text style undoes text alignment #614
tag is always wraped once when toggle the wysiwyg/source mode #612 - Error when resizing tables and tables cells. #611
- Backspace and Delete have an errant character #597
π New Feature
- Added
classSpan
plugin. Applying some className to selected text. Thanks https://github.com/s-renier-taonix-fr
const editor = new Jodit('#editor', {
controls: {
classSpan: {
list: {
class1: 'Classe 1',
class2: 'Classe 2',
class3: 'Classe 3',
class4: 'Classe 4',
class5: 'Classe 5'
}
}
}
});
- Added
UIFileInput
element. - Added
UIButtonGroup
element.
const group = new UIButtonGroup(jodit, {
label: 'Theme',
name: 'theme',
value: this.state.theme,
radio: true,
options: [
{ value: 'default', text: 'Light' },
{ value: 'dark', text: 'Dark' }
],
onChange: (values) => {
this.state.theme = values[0].value as string;
}
}),
π Internal
- Enabled
"importsNotUsedAsValues": "error"
intsconfig
- Refactoring
Filebrowser
module - Refactoring
Dialog
module - Added "stylelint-config-idiomatic-order" in style linter
- Added "en" bundle without another languages.
- Replaced
Config
system. You can change default setting in you extensions.
// before
const a = new Jodit();
a.options.allowResizeY; // true
Jodit.defaultOptions.allowResizeY = false;
a.options.allowResizeY; // true
// Now
const a = new Jodit();
a.options.allowResizeY; // true
Jodit.defaultOptions.allowResizeY = false;
a.options.allowResizeY; // false
- Added
promisify
mode indebounce
andthrottle
decorators. - Removed
src/core/ui/form/validators/key-validator.ts
. - Added
Async
.requestIdlePromise
method. - Removed
Helpers
.extend
method. - Added
Helpers
.loadImage
method. - Changed
render
method in state/ui system.
// Before
@component()
class UIBtn extends UIElement {
className() {
return 'UIBtn';
}
createContainer() {
const button = this.j.c.element('button');
button.style.color = 'red';
button.classList.add(this.getFullElName('button'))
this.j.e.on('click', button, this.onClick);
return button;
}
@autobind
onClick() {
alert('click');
}
}
// Now
@component()
class UIBtn extends UIElement {
className() {
return 'UIBtn';
}
render() {
return `<button class="&__button" style="color:red"></button>`;
}
@watch('container:click')
onClick() {
alert('click');
}
}
and styles
.jodit-ui-btn__button {
border: 1px solid #ccc;
}