[wp-trac] [WordPress Trac] #6431: Cannot use two editor instances
created with the_editor() on the same edit page
WordPress Trac
wp-trac at lists.automattic.com
Fri Mar 28 11:00:21 GMT 2008
#6431: Cannot use two editor instances created with the_editor() on the same edit
page
------------------------+---------------------------------------------------
Reporter: mastermind | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.6
Component: General | Version:
Severity: normal | Keywords: the_editor
------------------------+---------------------------------------------------
I have the following problem:
I'm writing a plugin for WP 2.5 that inserts a second editor on the page
editing page, using the function the_editor(). The relevant code is:
{{{
function seco_editor()
{
?>
<div id="seco_editorcontainer" class="postarea">
<h3><?php _e('Secondary content', 'seco'); ?></h3>
<?php the_editor($mystuff, 'seco_content', 'content', true, 3); ?>
</div>
<?php
}
add_action('edit_page_form', 'seco_editor');
add_action('edit_form_advanced', 'seco_editor');
}}}
It looks ok at first sight, and it works ok when visual editing is
disabled. But when you use a quicktag from the upper editor, it will
insert in the lower one. The lower editor works, though.
There are even worse problems in WYSIWYG mode: In the second editor, the
iconbar is missing until "visual" is clicked. Then, the editor instances
seem to interfer, both seem to be damaged (especially switching from
visual to HTML mode), although basic WYSIWYG operations work.
I would expect that it is possible to have more than one instance on one
page. (For example, it would be great if the excerpt textarea could also
have WYSIWYG capabilities added via a plugin.)
--
Ticket URL: <http://trac.wordpress.org/ticket/6431>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list