【问题标题】:Devexpress mvc html editor spell check not worksDevexpress mvc html编辑器拼写检查不起作用
【发布时间】:2013-07-03 05:57:18
【问题描述】:

我有使用 DevExpress ASP.NET MVC HTMLEditor 的 MVC 项目。编辑器处于局部视图中,在回调时呈现。这是拼写检查的初始化设置:

@Html.DevExpress().HtmlEditor(
settings =>
{
    settings.SettingsSpellChecker.Culture = new System.Globalization.CultureInfo("en-us");
    ASPxSpellCheckerISpellDictionary dictionary = new ASPxSpellCheckerISpellDictionary();
    dictionary.AlphabetPath = "~/Content/Dictionaries/EnglishAlphabet.txt";
    dictionary.GrammarPath = "~/Content/Dictionaries/english.aff";
    dictionary.DictionaryPath = "~/Content/Dictionaries/american.xlg";
    dictionary.CacheKey = "ispellDic";
    dictionary.Culture = new System.Globalization.CultureInfo("en-us");
    dictionary.EncodingName = "Western European (Windows)";
    settings.SettingsSpellChecker.Dictionaries.Add(dictionary);

    ...

    settings.Toolbars.Add(toolbar =>
        {
            toolbar.Items.Add(new ToolbarCheckSpellingButton(true));

            ...

        }
}).GetHtml()

但是当我按下“检查拼写”按钮时,编辑器不执行任何操作(只是发送回调以重新渲染部分视图)并且 js 控制台中没有错误。

是否还有其他选项可以启用我忘记检查的拼写检查?

【问题讨论】:

    标签: asp.net-mvc devexpress


    【解决方案1】:
    <script src="@Url.Content("~/Scripts/jquery-1.6.2.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.js")" type="text/javascript"></script>
    

    尝试后将这些添加到您的布局中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-05-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-02
      • 2012-02-29
      • 1970-01-01
      • 2011-07-02
      相关资源
      最近更新 更多