我一直在努力将ASPNetSpell的拼写检查程序(http://www.aspnetspell.com/)集成到CKEditor(http://ckeditor.com/)中.我看到IE 8 +,FireFox 12和Chrome 18.0.1025.152m之间存在一些令人不安的行为.
似乎缺点是ASPNetSpell在Chrome中找不到CKEditor的实例,但在IE和Firefox中它可以.
我遵循ASPNetSpell文档中的建议集成到"所有主要的HTML编辑器,包括FCKEditor,CKEditor,TinyMCE ......":
var spellinstance = new LiveSpellInstance();
spellinstance.Fields = "EDITORS";
spellinstance.ServerModel = "aspx";
spellinstance.DrawSpellImageButton();
Run Code Online (Sandbox Code Playgroud)
我的理解是,当您将Fields设置为"EDITORS"时,这指示ASPNetSpell的客户端脚本查找所有IFrame.
然而,模态对话框确实在Chrome中显示,我确实看到它向服务器发出请求,但是当它返回到对话框时,它的行为就像没有字段设置为拼写检查.当您要检查字段中的拼写错误时,IE和Firefox将以这种方式运行.
我有以下问题:
更新
我已向他们的支持发送了另一封电子邮件,其中包含此帖子的链接.希望ASPNETSPELL能够增加一些专业知识.
澄清
我知道ASPNETSPELL不支持编辑器使用的textarea上的SCAYT(键入时进行拼写检查).我正在寻找的功能是单击按钮时进行的显式拼写检查.
更新#2
我已经下载了ASPNetSpell Support的答案中引用的最新ASPNETSPELL包.我仍然没有运气在Chrome内部工作(当前版本现在是21.0.1180.89米).只有在没有附加CKEditor实例的情况下验证textarea时它才会起作用.
以下是我目前Razor视图的样子.
@using ASPNetSpell
@{
Layout = "~/_SiteLayout.cshtml";
Page.Title = "Welcome to my Web Site!";
}
@{
ASPNetSpell.Razor.SpellButton mySpellButton = new ASPNetSpell.Razor.SpellButton();
mySpellButton.InstallationPath = ("/Content/ASPNetSpellInclude");
mySpellButton.FieldsToSpellCheck = "myTextArea";
}
<p>
<div id="spellcheckthis">
<textarea id="myTextArea"></textarea>
</div>
<div>
@Html.Raw(mySpellButton.getHtml())
</div>
</p>
<script type="text/javascript" src="/scripts/ckeditor/ckeditor.js"></script>
<script type="text/javascript" …Run Code Online (Sandbox Code Playgroud) 当我在Visual Studio 2010中创建"空WebAPI"项目时,几个支持MVC网页的新程序集被添加为引用(以下列表中的少数示例):
为了清洁起见,我删除了那些我没有使用的DLL引用(或者我认为我没有"使用").部署到服务器时,我会得到如下例外:
Run Code Online (Sandbox Code Playgroud)Exception message: Could not load file or assembly 'System.Web.Razor,Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
我目前正在使用所有程序集对服务器进行bin部署,直到JIT compliation错误停止.
我理解FileNotFoundException.我知道运行时正在尝试解析该引用.
我的问题:当您尝试创建的所有内容都是WebAPI网站时,为什么需要随身携带MVC Razor程序集?是否需要删除另一个依赖项?