具体方法
首先找到dialogs/image/中的image.html
删除代码
代码如下 | 复制代码 |
<span tabSrc=”imgManager”><var id=”lang_tab_imgManager”></var></span> |
然后找到image.js中的
代码如下 | 复制代码 |
if ( id == “imgManager” ) { list.style.display = “”; //已经初始化过时不再重复提交请求 if ( !list.children.length ) { ajax.request( editor.options.imageManagerUrl, { timeout:100000, action:”get”, onsuccess:function ( xhr ) { //去除空格 var tmp = utils.trim(xhr.responseText), imageUrls = !tmp ? [] : tmp.split( “ue_separate_ue” ), length = imageUrls.length; g( “imageList” ).innerHTML = !length ? “ ”+lang.noUploadImage : “”; for ( var k = 0, ci; ci = imageUrls[k++]; ) { var img = document.createElement( “img” ); var div = document.createElement( “div” ); div.appendChild( img ); div.style.display = “none”; g( “imageList” ).appendChild( div ); img.onclick = function () { changeSelected( this ); }; img.onload = function () { this.parentNode.style.display = “”; var w = this.width, h = this.height; scale( this, 100, 120, 80 ); this.title = lang.toggleSelect + w + “X” + h; }; img.setAttribute( k < 35 ? “src” : “lazy_src”, editor.options.imageManagerPath + ci.replace(/s+|s+/ig,”") ); img.setAttribute( “data_ue_src”, editor.options.imageManagerPath + ci.replace(/s+|s+/ig,”") ); } }, onerror:function () { g( “imageList” ).innerHTML = lang.imageLoadError; } } ); } } |
删除即可!
上面是js的我们再附一篇NET下为百度文本编辑器UEditor增加图片删除功能 .
1、首先修改服务器端ueditornet下的文件imageManager.ashx,增加图片删除的处理。如下代码的Add部分所示:
代码如下 | 复制代码 |
<%@ WebHandler Language="C#" Class="imageManager" %> /** * Created by visual studio2010 * User: xuheng * Date: 12-3-7 * Time: 下午16:29 * To change this template use File | Settings | File Templates. */ using System; using System.Web; using System.IO; using System.Text.RegularExpressions; public class imageManager : IHttpHandler public void ProcessRequest(HttpContext context) string action = context.Server.HtmlEncode(context.Request["action"]); if (action == "get") //目录验证 //Add Start========================================================== 2013-05-12 //目录验证 public bool IsReusable |
首页 1 2 末页