[wp-trac] [WordPress Trac] #9874: extended and invalid elements for
tinymce
WordPress Trac
wp-trac at lists.automattic.com
Tue May 19 12:46:08 GMT 2009
#9874: extended and invalid elements for tinymce
-------------------------------+--------------------------------------------
Reporter: Denis-de-Bernardy | Owner: azaozz
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.8
Component: TinyMCE | Version: 2.8
Severity: normal | Keywords:
-------------------------------+--------------------------------------------
I've this code, which currently resides in a plugin:
{{{
add_filter('tiny_mce_before_init', array('sem_fixes', 'tiny_mce_config'));
function tiny_mce_config($o) {
# http://forum.semiologic.com/discussion/4807/iframe-code-
disappears-switching-visualhtml/
#
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/valid_elements#Full_XHTML_rule_set
# assume the stuff below is properly set if they exist already
if ( current_user_can('unfiltered_html') )
{
if ( !isset($o['extended_valid_elements']) )
{
$elts = array();
$elts[] =
"iframe[align<bottom?left?middle?right?top|class|frameborder|height|id"
.
"|longdesc|marginheight|marginwidth|name|scrolling<auto?no?yes|src|style"
. "|title|width]";
$elts = implode(',', $elts);
$o['extended_valid_elements'] = $elts;
}
}
else
{
if ( !isset($o['invalid_elements']) )
{
$elts = array();
$elts[] = "iframe";
$elts[] = "script";
$elts[] = "form";
$elts[] = "input";
$elts[] = "button";
$elts[] = "textarea";
$elts = implode(',', $elts);
$o['invalid_elements'] = $elts;
}
}
return $o;
} # tiny_mce_config()
}}}
basically, users were complaining about being enable to insert an iframe
in TinyMCE -- among many other things. shouldn't the above two be default
settings?
if so, just let me know and I'll write the patch. if not, please close as
invalid/wontfix.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9874>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list