File Selector widgets
const jodit = Jodit.make('#editor', {
filebrowser: {
ajax: {
url: 'https://xdsoft.net/jodit/connector/index.php?action=fileUpload'
}
}
});
FileSelectorWidget(
jodit,
{
filebrowser(data) {
console.log(data);
},
upload: true,
url(url, text) {
console.log(url);
}
},
null,
() => {},
true
);
FileSelectorWidget
FileSelectorWidget(editor, callbacks, elm, close, isImage?): HTMLDivElement
Generate 3 tabs
upload - Use Drag and Drop
url - By specifying the image url
filebrowser - After opening the file browser. In the absence of one of the parameters will be less tabs
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
editor |
IJodit |
undefined |
- |
callbacks |
ImageSelectorCallbacks |
undefined |
Object with keys url, upload and filebrowser, values which are callback functions with different parameters |
elm |
null | HTMLElement |
undefined |
- |
close |
() => void |
undefined |
- |
isImage |
boolean |
true |
- |
Returns
Defined in
jodit/src/modules/widget/file-selector/file-selector.ts:46
Previous
Next