Asp.net Mvc 的最佳 TinyMce 编辑器图像管理器/文件上传

发布于 2024-07-04 09:23:36 字数 1560 浏览 9 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

川水往事 2024-07-11 09:23:37

老问题。 但是,这对某人会有帮助。

http://www.andyarndt.net/TinyFileManager.aspx 是一个 .net Web 应用程序。 也适用于网络表单。 您可以进行位定制以使其也可以与 MVC 一起使用。


Edit:

您可以参考 Github TinyFileManager.NET 中提供的示例应用程序来了解如何配置并参考文档在上面提到的页面中提到。

自定义 CSS 以避免与 Bootstrap 版本发生冲突。 3.xx:

    div.mce-fullscreen
    {
        z-index: 1030;
    }
    div.mce-edit-area
    {
        border-width: 1px !important;
        border-left-width: 0 !important;
        border-bottom-width: 0 !important;
    }
    .mce-combobox .mce-btn
    {
        width: 44px !important;
        height: auto !important;
    }
    .mce-combobox .mce-btn button
    {
        padding-right: 0;
        padding-left: 0;
    }

ASP.net 控件:

 <asp:TextBox ID="txtAnnouncements" runat="server" TextMode="MultiLine" AutoComplete="off"
                CssClass="form-control elm1"></asp:TextBox>

TinyMCE Javascript:

    tfm_path = '/fileman';
    tinymce.init({
        //            document_base_url: "http://localhost:58841/",
        //            relative_urls: true,
        selector: "textarea.elm1",
        mode: "specific_textareas",
        editor_selector: "tinymce",
        theme: "modern",
        // width: 300,
        height: 300,
        plugins: [
    "advlist autolink lists link image charmap print preview hr anchor pagebreak",
    "searchreplace wordcount visualblocks visualchars code fullscreen",
    "insertdatetime media nonbreaking save table contextmenu directionality",
    "emoticons template paste textcolor "
],
        //    content_css: "css/content.css",
        toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | forecolor backcolor emoticons | bullist numlist outdent indent | link image | print preview media fullscreen ",
        image_advtab: true,
        encoding: "xml",
        setup: function (editor) {
            editor.on("SaveContent", function (i) {
                i.content = i.content.replace(/'/g, "&apos");
            });
        }
    });

保存数据库时,直接保存,重新绑定时,到文本框,使用HttpUtility.HtmlDecode()

Old question. However, it would be helpful to someone.

http://www.andyarndt.net/TinyFileManager.aspx is a .net web application. Works fine with webforms as well. You can do bit customization to get it worked with MVC as well.


Edit:

You can refer to the sample application provided in Github TinyFileManager.NET to how to configure and refer the documentation mentioned in above mentioned page.

Custom CSS to avoid some conflicts with Bootstrap ver. 3.x.x:

    div.mce-fullscreen
    {
        z-index: 1030;
    }
    div.mce-edit-area
    {
        border-width: 1px !important;
        border-left-width: 0 !important;
        border-bottom-width: 0 !important;
    }
    .mce-combobox .mce-btn
    {
        width: 44px !important;
        height: auto !important;
    }
    .mce-combobox .mce-btn button
    {
        padding-right: 0;
        padding-left: 0;
    }

ASP.net Control:

 <asp:TextBox ID="txtAnnouncements" runat="server" TextMode="MultiLine" AutoComplete="off"
                CssClass="form-control elm1"></asp:TextBox>

TinyMCE Javascript:

    tfm_path = '/fileman';
    tinymce.init({
        //            document_base_url: "http://localhost:58841/",
        //            relative_urls: true,
        selector: "textarea.elm1",
        mode: "specific_textareas",
        editor_selector: "tinymce",
        theme: "modern",
        // width: 300,
        height: 300,
        plugins: [
    "advlist autolink lists link image charmap print preview hr anchor pagebreak",
    "searchreplace wordcount visualblocks visualchars code fullscreen",
    "insertdatetime media nonbreaking save table contextmenu directionality",
    "emoticons template paste textcolor "
],
        //    content_css: "css/content.css",
        toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | forecolor backcolor emoticons | bullist numlist outdent indent | link image | print preview media fullscreen ",
        image_advtab: true,
        encoding: "xml",
        setup: function (editor) {
            editor.on("SaveContent", function (i) {
                i.content = i.content.replace(/'/g, "&apos");
            });
        }
    });

When saving the database, save directly, and when re-binding, to the textbox, use HttpUtility.HtmlDecode().

臻嫒无言 2024-07-11 09:23:37

Carlton:Alfresco 似乎是一个基于 Java 的解决方案。
Ta:我研究过插件文件夹,但没有一个真正适合 asp.net mvc。
我现在正在测试的是 Tiny 与 FCKEditor 图像上传器的混合:
这是 pho 版本,但我认为转换为 .net 非常容易 [Tinyfck][1]

[1]: this: http://p4a2.crealabsfoundation.org/tinyfck

Carlton : Alfresco seems to be a Java based solution.
Ta: I've looked into the plugin folders but none was really good for asp.net mvc.
What I'm now testing is a mix between Tiny with the image uploader of FCKEditor:
this is the pho version but I think it is pretty easy to convert to .net [Tinyfck][1]

[1]: this: http://p4a2.crealabsfoundation.org/tinyfck

拍不死你 2024-07-11 09:23:37

我刚刚在 codeplex 上启动了一个与 ASP.NET MVC 2 完美集成的项目。如果有人想帮忙,请告诉我...我希望尽快集成裁剪(通过 JCrop)和调整大小。

http://aspnetadvimage.codeplex.com/

您可以在“源代码”选项卡上下载示例项目。

I just started a project on codeplex that integrates nicely with ASP.NET MVC 2. Let me know if anyone wants to help out... I'm looking to integrate cropping (via JCrop) and resizing soon.

http://aspnetadvimage.codeplex.com/

You can download the sample project on the "Source Code" tab.

稚气少女 2024-07-11 09:23:37

Ajax 文件管理器 http://filemanager.3ntar.net/
免费又酷

Ajax File Manager http://filemanager.3ntar.net/
free and cooool

七秒鱼° 2024-07-11 09:23:37

这是 TinyMCE 与 ASP.NET MVC 3 中 FCKEditor 文件上传管理器的集成,应该尝试一下: http:// tinymcefckfilemanger.codeplex.com/

This is an integration of TinyMCE with FCKEditor File Upload Manager in ASP.NET MVC 3, should give it a try: http://tinymcefckfilemanger.codeplex.com/

千紇 2024-07-11 09:23:37

您可以尝试: http://tinymcefckfilemanger.codeplex.com/

但是,您必须进行一些自定义才能使其成功工作!

:)

You can try: http://tinymcefckfilemanger.codeplex.com/

However, you must have some customizes to make it work!

:)

半夏半凉 2024-07-11 09:23:36

SourceForge 上有几个开源插件,

http://sourceforge.net/tracker /?group_id=103281&atid=738747
(搜索图片)

如果您了解 Javascript,插件架构很容易理解。
如果您有时间,您可以推出自己的。

There are a couple of open source plugins on SourceForge,

http://sourceforge.net/tracker/?group_id=103281&atid=738747
(search for image)

The plugin architecture is easy to understand if you know Javascript.
If you have the time you could roll out your own.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文