这适用于拼写检查textaras,但我想将它附加到一个所见即所得的编辑器
尝试添加iframe ID但没有运气
< textarea name="TextArea1" id="futured" cols="20" rows="2"></textarea>
< a href="#check-textarea" id="check-textarea">check</a>
<script type="text/javascript">
// check the spelling on a textarea
$("#check-textarea").click(function(e){
e.preventDefault();
$(".loading").show();
$("#futured")
.spellchecker({
lang: "en",
engine: "google",
suggestBoxPosition: "above"
})
.spellchecker("check", function(result){
$(".loading").hide();
if (result) {
alert('There are no incorrectly spelt words.');
}
});
});
</script>