Jquery Ui 选项卡中的 JWYSIWYG 或 jHtmlArea [英] JWYSIWYG or jHtmlArea within a Jquery Ui Tab

查看:19
本文介绍了Jquery Ui 选项卡中的 JWYSIWYG 或 jHtmlArea的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法让我的 jwysiwyg 和 Jhtmlarea 文本编辑器在 AJAX 加载的 Jquery UI 选项卡中工作

两个文本编辑器在正常加载时都可以工作.

Both text editors work when loaded normally.

这会加载查看页面"上的标签

This loads the tabs on the "View Page"

 <script type="text/javascript">
 $(function() {
  $("#tabs").tabs();
 });
 </script>

这会在查看页面"上通过 AJAX 加载页面

This loads the page via AJAX on the "View Page"

<li><a href="/page/edit/">Edit</a></li>

这会加载编辑页面"上的 Html 区域

This loads the Html Area on the "Edit Page"

<script type="text/javascript" charset="utf-8">
$(function(){
    $("textarea").htmlarea();
});
</script>

所有帮助将不胜感激.

提姆

推荐答案

因为你在页面加载后将你试图 htmlarea-ize 的东西注入到 DOM 中,你必须把你的 $("textarea").htmlarea()在ajax调用的回调函数里面.

because you're injecting the things you're trying to htmlarea-ize into the DOM after the page loads, you have to put your $("textarea").htmlarea() inside the callback function of the ajax call.

这篇关于Jquery Ui 选项卡中的 JWYSIWYG 或 jHtmlArea的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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