JWYSIWYG or jHtmlArea within a Jquery Ui Tab

荒凉一梦 提交于 2019-12-02 04:47:46

问题


I am not able to get my jwysiwyg and Jhtmlarea text editors to work within an AJAX loaded Jquery UI Tab

Both text editors work when loaded normally.

This loads the tabs on the "View Page"

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

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

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

This loads the Html Area on the "Edit Page"

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

All help would be greatly appreciated.

Tim


回答1:


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.



来源:https://stackoverflow.com/questions/1704933/jwysiwyg-or-jhtmlarea-within-a-jquery-ui-tab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!