缺少TinyMCE Asp.NET 4图标

时间:2013-08-05 11:50:14

标签: asp.net tinymce icons

我对TinyMCE有疑问。我在网络表单中工作。客户端环境中的图标丢失。在我的本地机器上一切正常。我使用最新版本的TinyMCE 4.0.2。在服务器上有IIS 7.0。我已经通过许多不同的方式设置了它。我也试过在<head>部分编辑。效果总是一样的。这是我目前的实施:

 public static string GetTinyMce4JS(string path, string control, int width, int height, bool enableXmlEncoding = false)
    {
        StringBuilder sb = new StringBuilder();
        sb.Append(string.Format("<script src=\"{0}tinymce/js/tinymce/tinymce.min.js\" type=\"text/javascript\"></script>", path));

        sb.Append("<script type=\"text/javascript\">");
        sb.Append("tinymce.init({");
        sb.Append("selector : \".tinymce\",");         
        sb.Append("theme : \"modern\",");

        sb.Append(" menubar: false,");

        sb.Append("plugins : [ \"lists hr anchor pagebreak\",");
        sb.Append("\"wordcount visualblocks visualchars \",");
        sb.Append("\"insertdatetime nonbreaking directionality\",");
        sb.Append("\"paste textcolor moxiemanager\"],");


        sb.Append("toolbar1: \"newdocument fullpage | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | styleselect formatselect fontselect fontsizeselect\",");
        sb.Append("toolbar2: \"cut copy paste | searchreplace | bullist numlist | outdent indent blockquote | undo redo | link unlink anchor image media code | inserttime preview | forecolor backcolor\",");
        sb.Append("toolbar3: \"table | hr removeformat | subscript superscript | charmap emoticons | print fullscreen | ltr rtl | spellchecker | visualchars visualblocks nonbreaking template pagebreak restoredraft\",");      
        sb.Append("});");
        sb.Append("</script>");
        return sb.ToString();
    }

然后我在后面的代码中使用此函数(在Page_Load上调用):

string tinyJS = ApplicationHelper.GetTinyMce4JS(ResolveUrl("~"), this.TinyMCEEditor.ClientID, 800, 600, false);
this.TinyMCEJS.Text = tinyJS;

和aspx文件:

  <asp:Literal ID="TinyMCEJS" runat="server" />
  <asp:TextBox ID="TinyMCEEditor" runat="server" TextMode="MultiLine" Height="600px" ClientIDMode="Static" CssClass="tinymce" z-index="200"
                        Visible="true"></asp:TextBox>

这就是客户环境的样子:
enter image description here

在我的本地机器上也一样:

enter image description here

1 个答案:

答案 0 :(得分:2)

我终于解决了!!愚蠢的错误......我使用发布在服务器上部署Web应用程序。我在发布选项中设置了“只运行此应用程序所需的文件”,这就是原因。图标文件未发布。