2013-07-03 124 views
0

我有使用DevExpress ASP.NET MVC HTMLEditor的MVC项目。编辑器处于局部视图,呈现回调。下面是拼写检查初始化设置:Devexpress mvc html编辑器拼写检查不起作用

@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控制台,有没有错误。

是否有ani额外的选项来启用拼写检查,我忘了检查?

回答

0
<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> 

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