我正在尝试创建一个简单的可编辑字段(用于发布),同时组合拼写检查:
<div contenteditable="contenteditable" spellcheck="spellcheck" lang="en">text</div>
Run Code Online (Sandbox Code Playgroud)
(http://www.wufoo.com/html5/attributes/17-spellcheck.html)
它有效,但在Google Chrome上,拼写检查程序无法检测到该语言.(尽管指定了@lang属性)
Firefox中修复了"bug":https://bugzilla.mozilla.org/show_bug.cgi?id = 338427
但我找不到任何关于谷歌Chrome的实现.有没有办法通知拼写检查器HTML5字段中的预期语言?或许真的在<head>像charset,meta lang等?
尝试沿SVG中的路径呈现希伯来语文本会导致Chrome中的错误-字形向后(从左到右)呈现,使文本不可读。

<svg height="220" width="190">
<defs>
<path id="MyPath2" d="M0,100 L200,100" />
</defs>
<use xlink:href="#MyPath2" fill="none" stroke="red" />
<text text-anchor="middle" dx="100" dy="0" writing-mode="rl" direction="rtl">
<textPath xlink:href="#MyPath2">
????? ??? ????? ????
</textPath>
</text>
</svg>
Run Code Online (Sandbox Code Playgroud)
有办法解决这个问题吗?这是一个已知的错误,还是我应该使用的属性?
JSFIddle: http ://jsfiddle.net/j9RnL/
我有一个contentEditable div:
<div id="editor" contentEditable="true"> Enter your text here.. </div>\nRun Code Online (Sandbox Code Playgroud)\n\n还有一个dropdown button:
<div class="btn-group">\n <button class="btn dropdown-toggle" data-toggle="dropdown" title="Taille de police"><i class="fa fa-text-height"></i> <b class="caret"></b></button>\n <ul class="dropdown-menu" id="tailles"></ul>\n</div>\nRun Code Online (Sandbox Code Playgroud)\n\n为了用项目填充此下拉列表,我正在使用此脚本:
\n\n//Liste des tailles utilis\xc3\xa9\nvar tailles = [\n \'Petite (8px)\',\n \'Petite (10px)\',\n \'Petite (12px)\',\n \'Normale (14px)\',\n \'Grande (18px)\',\n \'Grande (24px)\',\n \'Grande (36px)\'\n];\n\n //R\xc3\xa9cuperer le drop down du Taille de police\n var taillesDropDown = document.getElementById(\'tailles\');\n\n //Population du drop down Taille du police\n tailles.forEach(function(taille){\n var li …Run Code Online (Sandbox Code Playgroud)