github xdan/jodit 3.9.6

latest releases: 4.2.29, 4.2.28, 4.2.27...
2 years ago

🚀 New Feature

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
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'
	]
});

Don't miss a new jodit release

NewReleases is sending notifications on new releases.