[wp-trac] [WordPress Trac] #18626: Update TineMCE with iOS5/contentEditable support

WordPress Trac wp-trac at lists.automattic.com
Fri Sep 9 15:03:29 UTC 2011


#18626: Update TineMCE with iOS5/contentEditable support
-----------------------------+------------------------------
 Reporter:  markoheijnen     |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Editor           |     Version:  3.3
 Severity:  normal           |  Resolution:
 Keywords:                   |
-----------------------------+------------------------------
Changes (by markoheijnen):

 * cc: marko@… (added)


Comment:

 Code sample of user_can_richedit that I use now.

 {{{
 function user_can_richedit() {
         global $wp_rich_edit, $pagenow, $is_iphone;

         if ( !isset( $wp_rich_edit) ) {
                 if ( get_user_option( 'rich_editing' ) == 'true' &&
                         ( ( preg_match( '!AppleWebKit/(\d+)!',
 $_SERVER['HTTP_USER_AGENT'], $match ) && intval($match[1]) >= 420 ) ||
                                 !preg_match( '!opera[
 /][2-8]|konqueror|safari!i', $_SERVER['HTTP_USER_AGENT'] ) ) &&
                         !( $is_iphone && intval($match[1]) < 534 )
                 ) {
                         $wp_rich_edit = true;
                 } else {
                         $wp_rich_edit = false;
                 }
         }

         return apply_filters('user_can_richedit', $wp_rich_edit);
 }
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18626#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list