开发者

Adding Spell Check wysiwyg editor

开发者 https://www.devze.com 2023-04-05 23:56 出处:网络
This works great for spell checking textaras but I want to attach it to a wysiwyg editor Tried adding the iframe id with no luck

This works great for spell checking textaras but I want to attach it to a wysiwyg editor

Tried adding the iframe id with no luck

< 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({
         开发者_StackOverflow社区   lang: "en",
            engine: "google",
            suggestBoxPosition: "above"
        })
        .spellchecker("check", function(result){
            $(".loading").hide();
            if (result) {
                alert('There are no incorrectly spelt words.');
            }
        });
    });

</script>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号