🚀 New Feature
- Feature request: Open the inline toolbar without having to highlight text. #600
Allow open inline toolbar. This feature is implemented on the basis of theinline-popup
plugin,
a setting has been added to it:popup.toolbar
, which lists the buttons that will be shown in such a toolbar.
Added theshowInline
method to theToolbarEditorCollection
itself:
const editor = Jodit.make('#editor', {
preset: 'inline',
popup: {
toolbar: Jodit.atom(['bold', 'italic', 'image'])
}
});
editor.s.focus();
editor.toolbar.showInline();
// or
editor.e.fire('showInlineToolbar');
Also added ToolbarCollection.hide
and ToolbarCollection.show
methods.
const editor = Jodit.make('#editor');
editor.toolbar.hide();
editor.toolbar.show();
- Allow use prototype as component name
console.log(Jodit.modules.UIButton.getFullElName('element')); // jodit-ui-button__element
console.log(Jodit.modules.UIButton.componentName); // jodit-ui-button
- Remember last opened folder with FileBrowser #675
Boolean optionfilebrowser.saveStateInStorage
split to dictionary:
interface IFileBrowserOptions: {}
saveStateInStorage: false | {
storeLastOpenedFolder?: boolean;
storeView?: boolean;
storeSortBy?: boolean;
};
}
By default:
{
saveStateInStorage: {
storeLastOpenedFolder: true,
storeView: true,
storeSortBy: true
}
}
Disable it:
Jodit.make('#editor', {
filebrowser: {
saveStateInStorage: false
}
});
// or
Jodit.make('#editor', {
filebrowser: {
saveStateInStorage: {
storeLastOpenedFolder: false
}
}
});
- Spacer in Button Toolbar
In addition to the|
metacharacters and\n
which stand for separator and newline, the---
metacharacter has appeared,
which allows you to add a spacer element which pushes all buttons behind the spacer to the right side of the toolbar
and creates space in the middle.
Jodit.make('#editor', {
buttons: [
'source',
'bold',
'|',
'---',
'|',
'brush',
'about',
'\n',
'italic'
]
});