CKEditor、JQuery:动画破坏了编辑器

发布于 2024-09-13 01:31:06 字数 334 浏览 2 评论 0原文

我在

元素中初始化 CKEditor。

$('#container').show(); 显示编辑器并且一切正常。

但是,如果我将调用与 $('#container').show('blind'); 之类的动画结合起来,编辑器就会进入前台(顺便说一句:动画看起来很不错),但是然而,编辑器坏了。

有人遇到同样的问题吗?这是 jquery 还是 CKEditor 的 bug?
我认为这是一个缩放问题,因为缩放和盲法不起作用。

I initialize a CKEditor in a <div style="display:none" id="container"></div> element.

$('#container').show(); shows the editor and everything works.

However, if i combine the call with an animation like $('#container').show('blind');, the editor comes to the foreground (btw: the animation looks sweet), but however, the editor gets broken.

Did someone had the same problem? Is this a jquery or a CKEditor bug?
I think its a scaling problem, because scale and blind don't work.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情话墙 2024-09-20 01:31:06

我有同样的问题。作为解决方法,我使用了普通 jQuery 中的 .slideDown() 函数,并且 CKEditor 可以正常工作。像这样的:

$('#container').slideDown();

除了 .slideDown() 之外,还有 .slideUp().slideToggle()

I have the same problem. As a work around I used the .slideDown() function from plain jQuery and the CKEditor worked. Something like this:

$('#container').slideDown();

As well as .slideDown() there is also .slideUp() and .slideToggle().

—━☆沉默づ 2024-09-20 01:31:06

刚刚发现了一个解决方法。如果您在动画之后再次重新粘贴数据,它似乎可以工作!例如:

$j(".content-other").hide('slide', {direction: "right"}, 400, function () {
        $j(this).html(data); // show it initially for the slide-in
        $j(this).show('slide', {direction: "right"}, 400, function () {
            $j(this).html(data); // after the animation's done, place it again
        });
});

第二个 html() 是重要的。似乎动画过程对其做了一些事情。

Just discovered a work-around for this. If you re-paste your data once again after the animation, it seems to work! For example:

$j(".content-other").hide('slide', {direction: "right"}, 400, function () {
        $j(this).html(data); // show it initially for the slide-in
        $j(this).show('slide', {direction: "right"}, 400, function () {
            $j(this).html(data); // after the animation's done, place it again
        });
});

The second html() is what's important. Seems the animating process does something to it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文