2016-10-31 38 views
0

我在WordPress中創建了一個小型自定義測試管理員頁面,當我插入wp_editor命令時,textarea顯示在工作區域的頂部?TinyMCE元素在自定義WordPress頁面上不合適

不幸的是沒有CSS能夠將其恢復到正確的位置。任何幫助或想法將不勝感激。

Image of the problem

編輯:謝謝你的快速回復我寫下面的代碼非常簡單。正如你可以看到它是什麼超級,只是一個測試:

function TstPlg_PageDisplay() { 
     $MyPage = ' 
     <div class="wrap"> 
     <h2>TestPlugin</h2> 
     <p>This is a test for the TestPlugin Page</p> 
     <hr> 
     <div> 
      '.wp_editor('','MyTextArea').' 
     </div> 
     </div>'; 
     echo $MyPage; 
    } 
    function TstPlg_AddMenuPAge() { 
     add_menu_page('TstPlg_PageDisplay', 'Test Plugin', 'manage_options', 'TstPlg_PageDisplay', 'TstPlg_PageDisplay'); 
    } 
    add_action ('admin_menu', 'TstPlg_AddMenuPAge'); 

回答

0

看來(這很難不代碼),將textarea的是呼應和插件代碼直接outputed。

爲了避免這種情況,你可以在你想要的地方使用ob_start(),ob_get_clean()和echo結果(textarea)。