jQuery步骤插件与CKeditor RTE插件冲突 [英] Jquery steps plugins conflict with CKeditor RTE plugins

查看:164
本文介绍了jQuery步骤插件与CKeditor RTE插件冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我正在使用 http://www.jquery-steps.com/Examples作为我的向导表单插件.

Hi guys I am using this http://www.jquery-steps.com/Examples as my wizard form plugins.

我注意到它与Ckeditor插件发生冲突,错误为Uncaught TypeError:无法读取null的'unselectable'属性.

I notice that it has a conflict with Ckeditor plugin with an error of Uncaught TypeError: Cannot read property 'unselectable' of null.

我只是在这篇文章中尝试过解决方案使用jQuery表单向导的Kekeditor ,但是无法解决问题.

I just tried the solution on this post Ckeditor with jQuery form wizard but it doesn't fix the issue.

什么是最好的解决方案?

What is the best solution for this?

推荐答案

我想您已将CKeditor直接放入向导HTML代码中.在那种情况下,真正重要的是要了解jQuery Steps操作DOM对象.一般来说,这真的对javascript代码不利.

I guess you put the CKeditor right into the wizard HTML code. In that case what´s really important to understand is that jQuery Steps manipulates DOM objects. That´s really bad for javascript code in general.

要在jQuery步骤中运行javascript控件,您必须确保:

To run javascript controls within jQuery Steps you have to ensure that:

  1. 向导HTML内没有JavaScript代码
  2. 先执行jQuery Steps代码,然后执行向导HTML中属于HTML的javascript代码

很好的例子:

<script>
    $(function ()
    {
        // first jQuery Steps
        $("#wizard").steps();
        // then components inside jQuery Steps
        $("#editor").ckeditor();
    });
</script>
<div id="wizard">
    <h1>Title</h1>
    <div>
        <div id="editor"></div>
    </div>
</div>

错误的例子:

<script>
    $(function ()
    {
        $("#wizard").steps();
    });
</script>
<div id="wizard">
    <h1>Title</h1>
    <div>
        <script>
            $(function ()
            {
                $("#editor").ckeditor();
            });
        </script>
        <div id="editor"></div>
    </div>
</div>

干杯, 拉斐尔

这篇关于jQuery步骤插件与CKeditor RTE插件冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆