提取CuteEditor编辑器中的图片地址,并将远程图片保存到本地
来源:互联网 发布:淘宝如何优化排名 编辑:程序博客网 时间:2024/05/17 09:28
有个属性的AutoConfigure
选择其中的,按钮就会不同,还可以自己定义
本篇文章来自<A href='http://www.soidc.net'>IDC专家网</a> 原文链接:http://www.soidc.net/discuss/5/060815/10/428252_1.html
要自定义的话,在文件夹CuteSoft_ClientCuteEditorConfigurationAutoConfigure
下面,修改其中一个,在选择它就好了
比如改Minimal.config
<item name="Editing" value="False" />
<item name="Format" value="False" />
<item name="Insert" value="False" />
<item name="InsertAdvanced" value="False" />
<item name="InsertFiles" value="False" />
<item name="InsertForms" value="False" />
<item name="Relative" value="False" />
<item name="Tags" value="False" />
<item name="Verbs" value="False" />
去掉item某项,就不显示了
本篇文章来自<A href='http://www.soidc.net'>IDC专家网</a> 原文链接:http://www.soidc.net/discuss/5/060815/10/428252_1.html
string str = "<img height=/"325/" width=/"500/" src=/"/image/B011627669461283B6A55B8611153813.jpg/" />";
string str = "<input type=/"image/" height=/"325/" width=/"500/" src=/"FCKeditor/editor/filemanager/connectors/aspx/userfiles/image/B011627669461283B6A55B8611153813.jpg/" />";
System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex(@"<input[^>].*?src=""(?<src>[^""].*)""[^>].*?>", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex(@"<img [^>].*?src=""(?<src>[^""].*)""[^>].*?>", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
System.Text.RegularExpressions.MatchCollection m = reg.Matches(str); //设定要查找的字符串
System.Text.RegularExpressions.MatchCollection m = reg.Matches(str); //设定要查找的字符串
for (int i = 0; i < m.Count; i++)
{
Response.Write(m[i].Groups["src"].ToString() + "<br>");
}
string str = "这里是你从从数据库里读出的内容,包括很多图片的html标签(如 <img )";
System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex(@" <img[^>].*?src=""(? <src>[^""].*)""[^>].*?>",System.Text.RegularExpressions.RegexOptions.IgnoreCase);
System.Text.RegularExpressions.MatchCollection m = reg.Matches(str); //设定要查找的字符串
for (int i = 0; i < m.Count; i++)
{
Response.Write(m[i].Groups["src"].ToString()+" <br>");
}
//提取CuteEditor编辑器中的图片地址,并将远程图片保存到本地
Regex re = new Regex(@"src/s*=/s*(?:([""'])(?<src>[^""']+)/1|(?<src>[^/s>]+))", RegexOptions.IgnoreCase | RegexOptions.Singleline);
MatchCollection mc = re.Matches(this.Editor1.XHTML.ToString());
foreach (Match m in mc)
{
string url=m.Groups["src"].Value;
string filepath=url;
if(url.Substring(0,7).ToLower()=="http://")
{
string KuoZhangMing="."+url.Substring(url.LastIndexOf(".")+1);
string path = HttpContext.Current.Server.MapPath(@"/MLXZ/Uploads/Download/");
string filename=DateTime.Now.ToString("yyyyMMddHHmmss")+KuoZhangMing;
path=path+filename;
mailto:filepath=@%22/MLXZ/Uploads/Download/%22+filename;
WebClient myWebClient = new WebClient();
myWebClient.DownloadFile(url,path);
this.Editor1.Text=this.Editor1.XHTML.ToString().Replace(url,filepath);
}
Pic.Items.Add(new ListItem(filepath,filepath));
}
string str = "这里是你从从数据库里读出的内容,包括很多图片的html标签(如 <img )"
string[] stes=new string []{};//一个数组
System.Text.RegularExpressions.Regex reg=new System.Text.RegularExpressions.Regex(@" <img[^>].*?src=""(? <src>[^""].*)""[^>].*?>",System.Text.RegularExpressions.RegexOptions.IgnoreCase);
System.Text.RegularExpressions.MatchCollection m = reg.Matches(str); //设定要查找的字符串
for (int i = 0; i < m.Count; i++)
{
stes[i]= m[i].Groups["src"].ToString();
}
this.DropDownList1.DataSource = stes;
this.DropDownList1.DataBind();
List <string> swd=new List <string>();
for (int i = 0; i < m.Count; i++)
{
swd.add( m[i].Groups["src"].ToString());
}
- 提取CuteEditor编辑器中的图片地址,并将远程图片保存到本地
- 提取CuteEditor编辑器中的图片地址,并将远程图片保存到本地
- 提取CuteEditor编辑器中的图片地址,并将远程图片保存到本地
- 用asp自动解析网页中的图片地址,并将其保存到本地服务器
- 用asp自动解析网页中的图片地址,并将其保存到本地服务器
- 用asp自动解析网页中的图片地址,并将其保存到本地服务器
- 用asp自动解析网页中的图片地址,并将其保存到本地服务器
- >+ 用asp自动解析网页中的图片地址,并将其保存到本地服务器
- 用asp自动解析网页中的图片地址,并将其保存到本地服务器
- 用asp自动解析网页中的图片地址,并将其保存到本地服务器
- php正则匹配文章中的远程图片地址并下载图片到本地
- php正则匹配文章中的远程图片地址并下载图片到本地
- 保存远程图片到本地
- 将图片保存到本地
- 保存远程图片到本地并加水印
- php获取远程图片并下载保存到本地
- PHP获取远程图片并保存到本地
- php获取远程图片并下载保存到本地
- 最好的CuteEditor 6.0配置使用全解
- 存储过程基础
- Flex动态获取flash资源库文件
- Xen and the Art of Virtualizati-系统所翻译
- .NET使用一般处理程序生成验证码
- 提取CuteEditor编辑器中的图片地址,并将远程图片保存到本地
- Linux汇编语言开发指南
- 相册图片头尾相接的滚动算法
- 常用运算放大器
- 整理一下 jQuery 1.4.2 自己常用的部分
- ASN.1 入门
- Linux中x86的内联汇编
- 滚动条在刷新之后不往首页走(非Ajax技术)
- Matt Pietrek先生的《深入探索PE文件结构》