惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
SecWiki News
SecWiki News
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
量子位
M
MIT News - Artificial intelligence
GbyAI
GbyAI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
TaoSecurity Blog
TaoSecurity Blog
博客园 - 【当耐特】
H
Heimdal Security Blog
腾讯CDC
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
Hacker News: Ask HN
Hacker News: Ask HN
S
Schneier on Security
Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
博客园 - 司徒正美
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
Cybersecurity and Infrastructure Security Agency CISA
S
SegmentFault 最新的问题
大猫的无限游戏
大猫的无限游戏
Application and Cybersecurity Blog
Application and Cybersecurity Blog
F
Full Disclosure
有赞技术团队
有赞技术团队
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Threatpost
月光博客
月光博客
A
Arctic Wolf
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
雷峰网
雷峰网
T
Troy Hunt's Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Cloudflare Blog
D
DataBreaches.Net
O
OpenAI News
L
LINUX DO - 最新话题
宝玉的分享
宝玉的分享
小众软件
小众软件
V
Vulnerabilities – Threatpost
A
About on SuperTechFans
人人都是产品经理
人人都是产品经理
T
The Exploit Database - CXSecurity.com
Martin Fowler
Martin Fowler
美团技术团队
P
Privacy International News Feed

博客园 - 祥子哥哥

纪念一下我的20年的博客园。 [转]OPC.Client for DA and UA 使用C#开发库UcAsp.OPC.Client使用案例 推荐一个.Net的轻型RPC服务UcAsp.RPC Lucene.Net Kmeans++算是DONet实现 C#中图片处理中定义显示区域[或者可以称为蒙板效果] C#生成的图片如何设置DPI Jpg保存图片确认质量 Flex在子控件操作父窗口函数 Flex 不同 application 之间传参数(转) - 祥子哥哥 刚刚写的一个加密算法 如何在DropDownList第一項加入新項目 2003服务器中出现"请求的资源在使用中"错误的解决方法 如何在.Net中访问MySQL数据库 MS SQL日志清理代码 Server Application Error Javascript检测Flash插件是否安装及版本号 最近ASP.NET WAP开发的一些情况! 数据库备份
tinymce上传文件插件。
祥子哥哥 · 2013-05-23 · via 博客园 - 祥子哥哥
tinymce.PluginManager.add("upfile", function (e) {
    var t = e.settings;    
    e.addCommand("InsertUpFile", function () {
        e.windowManager.open({
            title: "上传图片",
            width:parseInt(e.getParam("plugin_upfile_width", "300"), 10),
            height: parseInt(e.getParam("plugin_upfile_height", "100"), 10),
            html: '<div style="margin:10px"><select name="filepath"><option value="product">产品图片</option><option value="friendship">友情链接</option><option value="decorate">装修图片</option><option value="other">其他</option></select><br /><br /><input id="TinymcefileToUpload" type="file"  name="TinymcefileToUpload" class="input"></div>',
            buttons: {
                    text: "上传",
                    onclick: function () {                        
                        $.ajaxFileUpload
                        (
                            {
                                url: '/Admin/Index/UpFile?Path=' + $("select[name='filepath']").val(),//修改成您的地址就可以了
                                secureuri: false,
                                fileElementId: 'TinymcefileToUpload',
                                dataType: 'json',
                                beforeSend: function () {
                                    $("#loading").show();
                                },
                                complete: function () {
                                    $("#loading").hide();

                                },
                                success: function (data, status) {
                                    if (typeof (data.error) != 'undefined') {
                                        if (data.error != '') {
                                            alert(data.error);
                                        } else {                                           
                                            e.execCommand("mceInsertContent", !1, "<img src=" + data.msg + ">");
                                            
                                        }
                                    }
                                },
                                error: function (data, status, e) {
                                    alert(data);
                                    alert(e);
                                }
                            }
                        )
                        this.parent().parent().close();
                        
                    }
           
            }
        })
    }), e.addButton("upfile", {
        icon: "image",
        tooltip: "上传图片",
        cmd: "InsertUpFile"
    }), e.addMenuItem("upfile", {
        icon: "image",
        text: "上传图片",
        cmd: "InsertUpFile",
        context: "insert"
    });
});

 需要引用"ajaxfileupload"jquery上传文件插件。