开发者

CKEditor 3.1 jquery adapter?

<script type="text/javascript" language="javascript" src="/Content/Scripts/jquery-1.3.2.min.js"></script>        
<script type="text/javascript" src="/Content/ckeditor/ckeditor.js"></script>    
<script type="text/javascript" src="/Content/ckeditor/adapders/jquery.js"></script>    
<script type="text/javascript" language="javascript">
    $(function() {
        $('textarea.ckeditor').ckeditor();
    });        
</script>

<textarea class="ckeditor" cols="5" id="Title" name="Title" rows="5">
</textarea>

It all works fine but before loading page it alerts this "Microsoft JScript runtime error: Ob开发者_运维百科ject doesn't support this property or method"

But it works after the Visual Studio alert, what might be the reason ?

Thanks in advance


You should put the code to create the CKEditor instance after the textarea element (or on the onload event of the page).

I don't think that this is also part of the problem, but the folder as distributed is named "adapters", not "adapders"

And it works later because the textarea has the class="ckeditor", so that textarea is automatically replaced: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.html#.replaceClass

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜