Ignore:
Timestamp:
05/27/09 19:14:48 (3 years ago)
Author:
MichaelTempest
Message:

Item1666: Process the WYSIWYG_COLOR class, when applied to tags other than span and font (which worked already)

Add unit tests for WYSIWYG_COLOR class, applied to other tags, also in combination with the WYSIWYG_TT class.

Add unit tests for list types and verbatim nbsp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm

    r3947 r3984  
    455455    { 
    456456 
     457                my %new_attrs = ( class => $class ); 
     458        $new_attrs{style} = $this->{attrs}->{style} 
     459          if exists $this->{attrs}->{style}; 
    457460        my $newspan = 
    458461          new Foswiki::Plugins::WysiwygPlugin::HTML2TML::Node( $this->{context}, 
    459             'span', { class => $class } ); 
     462            'span', \%new_attrs ); 
    460463        my $kid = $this->{head}; 
    461464        while ($kid) { 
     
    512515 
    513516    $this->_moveClassToSpan('WYSIWYG_TT'); 
     517    $this->_moveClassToSpan('WYSIWYG_COLOR') 
     518      if lc( $this->{tag} ) ne 'font'; 
    514519 
    515520    # See if we have a TML translation function for this tag 
     
    865870        if ( $kid->{tag} eq 'th' ) { 
    866871            $kid->_moveClassToSpan('WYSIWYG_TT'); 
     872            $kid->_moveClassToSpan('WYSIWYG_COLOR'); 
    867873            ( $flags, $text ) = $kid->_flatten($options); 
    868874            $text = _TDtrim($text); 
     
    871877        elsif ( $kid->{tag} eq 'td' ) { 
    872878            $kid->_moveClassToSpan('WYSIWYG_TT'); 
     879            $kid->_moveClassToSpan('WYSIWYG_COLOR'); 
    873880            ( $flags, $text ) = $kid->_flatten($options); 
    874881            $text = _TDtrim($text); 
Note: See TracChangeset for help on using the changeset viewer.