upload.js 831 Bytes

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 : 'Загрузить',
				
				  }
      		]
      	
      
      
    }]
  };
});