1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- (function() {
- CKEDITOR.dialog.add("uploadimage",
- function(a) {
- return {
- title: "图片上传",
- minWidth: "660px",
- minHeight:"400px",
- contents: [{
- id: "tab1",
- label: "",
- title: "图片上传",
- expand: true,
- width: "420px",
- height: "300px",
- padding: 0,
- elements: [{
- id:"uploadimage",
- type: "html",
- style: "width:100%;height:100px",
- html: '<input type="file" name="" id="uploadImg" value="" placeholder="请选择文件"/>'
- },
- /*{
- id: "Upload",
- filebrowser: "uploadButton",
- html: '<div><input type="file" placeholder="请选择文件"/></div>'
- },*/
-
- ]
- }],
- onOk: function() {
- /*var ins = "a";
- var num = "window.imgs.length";
- if(window.duiqi == undefined || window.duiqi == null){
- window.duiqi = "none";
- }
- for(var i=0;i<num;i++){
- var imgHtml = "<p";
- if("center" == window.duiqi){
- imgHtml += " style=\"text-align:center\">";
- }else{
- imgHtml += ">";
- }
-
- imgHtml += "<img src=\"" + window.imgs[i].url + "\" ";
- if("none" != window.duiqi && "center" != window.duiqi){
- imgHtml += "style=\"float: " + window.duiqi + ";\"/>";
- }else{
- imgHtml += "/>";
- }
- imgHtml += "</p>";
- ins.insertHtml(imgHtml);
- }
- window.imgs = new Array();
- //点击确定按钮后的操作
- //a.insertHtml("编辑器追加内容"); */
- },
- onShow: function () {
- //document.getElementById("uploadimage").setAttribute("src","/image/image.html?v=' +new Date().getSeconds() + '");
- }
- }
- })
- })();
|