Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Making a WordPress plugin, using WordPress 3.5.2

I'm using wp_editor() on the front end, inside jquery UI tabs [ajax loading tabs + 2 editors on the same panel], and I'm getting the following error, when clicking visual.

switchEditors is not defined

I've even tried adding this; it errors out tinyMCE is not defined.

this is my code:

<div id="tabs">
<ul id="wpsca_ul">
    <li><a href="<?php echo get_option( 'siteurl' ).'/?wpsca=wpscalist';?>" title="manage list"><?php echo __('Manage Pages','wpsca_lang');?></a></li>
    <li><a href="<?php echo get_option( 'siteurl' ).'/?wpsca=wpscaaddedit';?>" title="manage addedit"><?php echo __('Add Page','wpsca_lang');?></a></li>
    <li><a href="<?php echo get_option( 'siteurl' ).'/?wpsca=wpscasettings';?>" title="manage settings"><?php echo __('Settings','wpsca_lang');?></a></li>
</ul>

<div id="manage_list">loading...</div>
<div id="manage_addedit" class="ui-tabs-hide">loading...</div>
<div id="manage_settings" class="ui-tabs-hide">loading...</div>
</div><!-- tabs -->

And I'm picking the tabs up on init;

Any direction would be appreciated

share|improve this question
add comment

1 Answer 1

I have tackled this by putting TinyMCE on the first tab, and making it a static tab, all others are still ajax, would still like it to be ajax, if anyone has any solutions.

<div id="tabs">
<ul id="wpsca_ul">
    <li><a href="#wpsca_addedit" title="add page"><?php echo __('Add Page','wpsca_lang');?></a></li>
    <li><a href="<?php echo get_option( 'siteurl' ).'/?wpsca=wpscalist';?>" title="manage addedit"><?php echo __('Manage Pages','wpsca_lang');?></a></li>
    <li><a href="<?php echo get_option( 'siteurl' ).'/?wpsca=wpscasettings';?>" title="manage settings"><?php echo __('Settings','wpsca_lang');?></a></li>
</ul>

<div id="wpsca_addedit">
< ? php wp_editor() coding ?>
</div>
<div id="manage_list" class="ui-tabs-hide">loading...</div>
<div id="manage_settings" class="ui-tabs-hide">loading...</div>
</div><!-- tabs -->
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.