2014-03-29 72 views
1

我想在SP2013的Content Editor webpart中添加Sharepoint拼寫檢查器Javascript。如何在內容編輯器webpart中添加Sharepoint拼寫檢查器Javascript

link to do it in custom page:

但我的要求是在CEW上的錨標記使用。我厭倦了下面的代碼,但它不工作。什麼是正確的做法?

<script type="text/javascript" language="javascript" src="/_layouts/1033/form.js"></script><script type="text/javascript" language="javascript" src="/_layouts/1033/core.js"></script><script type="text/javascript" language="javascript" src="/_layouts/1033/bform.js"></script><script type="text/javascript" language="javascript" src="/_layouts/1033/SpellCheckEntirePage.js"></script><script language="」javascript」" type="」text/javascript」"> 
function doSpellCheck() { 
SpellCheckEntirePage('/_vti_bin/SpellCheck.asmx', '/_layouts/SpellChecker.aspx'); 
}</script> 

<a href="#" onclick="doSpellCheck(); return false;">Test</a>​​​​​​​​​​ 
+1

我得到它的工作通過使用下面的代碼。我是回答在座的,這樣它可以幫助別人。 – user3476088

回答

1
<script src="/_layouts/15/core.js?rev=%2FmcwmyWAFSbQRHlXU4BIBg%3D%3D"  type="text/javascript"></script> 
<script src="/_layouts/15/bform.js?rev=vpNFu8lw3ualVEnVze6Hhw%3D%3D" type="text/javascript"></script> 
<script src="/_layouts/15/spellcheckentirepage.js?rev=tyo1KV6W91uXeSLj34Myzw%3D%3D" type="text/javascript"> 

</script><script language="javascript" type="text/javascript"> function doSpellCheck() { 
SpellCheckEntirePage('/_vti_bin/SpellCheck.asmx', '/_layouts/SpellChecker.aspx'); 
} 
</script><a onclick="doSpellCheck()" href="#"><img alt="Spell Check" src="/Policies/Forms/_layouts/1033/images/RTE2SPCHK.GIF" style="border: 0px 
currentcolor;"/>Spellcheck</a> 

相關問題