upload.js
831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
CKEDITOR.dialog.add('upload', function(editor) {
return {
title : 'Загрузка изображения',
minWidth : 400,
minHeight : 200,
onOk: function() {
var cuttext = this.getContentElement( 'cut', 'cuttext').getInputElement().getValue();
this._.editor.insertHtml('<iktomi-cut>' + cuttext + '</iktomi-cut>');
},
contents : [{
id : 'cut',
label : 'First Tab',
title : 'First Tab',
elements : [
{
type : 'html',
html : '<form>',
},
{
id : 'cuttext',
type : 'file',
label : 'выберите файл для загрузки'
},
{
type : 'button',
value : 'Загрузить',
label : 'Загрузить',
}
]
}]
};
});