2013-07-03 54 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> 

嘗試之後,將這些添加到您的佈局。