Static
Readonly
ESStatic
STATUSESReadonly
beforeReadonly
beforeReadonly
destructed: "destructed"Readonly
ready: "ready"Readonly
componentsAll created ViewComponent inside this view
Readonly
createStatic
defaultReadonly
dialogStatic
Readonly
esStatic
Readonly
esID attribute for source element, id add {id}_editor
it's editor's id
Readonly
isTrue, if dialog was opened
Readonly
isReadonly
modsThe window in which jodit was created
Readonly
uidStatic
Readonly
versionGet path for loading extra staff
Some extra data inside editor
copyformat plugin
Current component status
Setter for current component status
Return default timeout period in milliseconds for some debounce or throttle functions.
By default, {history.timeout}
options
Component was destructed
View is in fullSize
The component is currently undergoing destructuring or has already been destroyed. Those. you should not hang new events on him now or do anything else with him.
View is locked
Component is ready for work
Short alias for options
progress_bar Progress bar
Container for persistent set/get value
Container for toolbar
Bind destructor to some View
destruct
destroy
//You can close dialog two ways
var dialog = new Jodit.modules.Dialog();
dialog.open('Hello world!', 'Title');
var $close = dialog.create.fromHTML('<a href="#" style="float:left;" class="jodit-button">
<i class="icon icon-check"></i> ' + Jodit.prototype.i18n('Ok') + '</a>');
$close.addEventListener('click', function () {
dialog.close();
});
dialog.setFooter($close);
// and second way, you can close dialog from content
dialog.open('<a onclick="var event = doc.createEvent('HTMLEvents'); event.initEvent('close_dialog', true, true);
this.dispatchEvent(event)">Close</a>', 'Title');
Safe get any field
the path to be traversed in the obj object
Optional
obj: IDictionarythe object in which the value is searched
private a = {
b: {
c: {
e: {
g: {
color: 'red'
}
}
}
}
}
this.get('a.b.c.e.g.color'); // Safe access to color
// instead using optionsl chaining
this?.a?.b?.c?.e?.g?.color
Return element with BEM class name
Return elements with BEM class name
Calc BEM element class name
element name in the bem classification
Make one instance of one module
Optional
options: objectStatic
getAdds a handler for changing the component's status
the status at which the callback is triggered
a function that will be called when the status is status
Static
isIt opens a dialog box to center it, and causes the two event.
true - After closing the window , the destructor will be called.
setHeader
It opens a dialog box to center it, and causes the two event.
true - After closing the window , the destructor will be called.
true window will be opened in modal mode
setHeader
It opens a dialog box to center it, and causes the two event.
setHeader
Register button for group
It specifies the contents of the dialog box. It can take a string and an array of objects
A string or an HTML element , or an array of strings and elements
var dialog = new Jodi.modules.Dialog(parent);
dialog.setHeader('Hello world');
dialog.setContent('<form onsubmit="alert(1);"><input type="text" /></form>');
dialog.open();
Sets the bottom of the dialog. It can take a string and an array of objects
A string or an HTML element , or an array of strings and elements
var dialog = new Jodi.modules.Dialog(parent);
dialog.setHeader('Hello world');
dialog.setContent('<form><input id="someText" type="text" /></form>');
dialog.setFooter([
$('<a class="jodit-button">OK</a>').click(function () {
alert($('someText').val())
dialog.close();
})
]);
dialog.open();
Specifies the dialog box title . It can take a string and an array of objects
A string or an HTML element , or an array of strings and elements
var dialog = new Jodi.modules.Dialog(parent);
dialog.setHeader('Hello world');
dialog.setHeader(['Hello world', '<button>OK</button>', $('<div>some</div>')]);
dialog.open();
Set/remove BEM class modification
if null, mod will be removed
Optional
container: HTMLElementChange panel container
Set component status
component status
ComponentStatus
Remove button from group
If you like Jodit - try Jodit PRO
Module to generate dialog windows