TinyMCE with ajax tabs

前端 未结 5 1950
面向向阳花
面向向阳花 2021-01-16 04:49

I\'m using tabs component of JQuery UI 1.8, and I\'m loading content of tabs via ajax (html content). In one of this tabs I\'m using tinyMCE component, and when I load this

5条回答
  •  没有蜡笔的小新
    2021-01-16 05:26

    It might be worth re-initialising tiny MCE every time you switch back to the tab with the editor in. You can use the "select" event on the tab object.

    $( ".selector" ).tabs({
      select: function(event, ui) { 
        // initialise Tiny MCE here
      }
    });
    

    You may have to destroy any previous instances of / references to the editor before re-initialising.

提交回复
热议问题