Hi.

Please see attached. I inserted an image & resized it. It seems to render outside it's square, if you know what I mean. This may not be your issue. Theme is standard Garland, Drupal 6.3. Used full html filter.

I did notice that going back to edit the text, the cursor disappeared. Text was justified left, picture was justified right. This only happened once, of course & I couldn't repeat it. Not so useful - sorry.

CommentFileSizeAuthor
Clipboard01.jpg41.84 KBCAD bloke

Comments

jeffcd’s picture

Status: Active » Closed (fixed)

Yeah this looks like some sort of placement issue. It would be more useful to see the html of the page. Not much we can do about this without more information. (unless someone else has any great insights?)

Closing since this has been open for a while and no one seems to have a response.

Sorry. :-)

cmgui’s picture

I have the same problem.

The image just does not appear.
Only appear in Edit mode.

Thank you.

cmgui’s picture

Status: Closed (fixed) » Active

I have the same problem.

The image just does not appear.
Only appear in Edit mode.

Thank you.

OK, I found the cause, the re-size isn't working and the image is too big.

Delete Me-1’s picture

The Drupal HTML filter deletes the style="xyz" attribute from image tags. We used this code in filter.module to enable resizing (from line 1045):

  // Is there a closing XHTML slash at the end of the attributes?  // In PHP 5.1.0+ we could count the changes, currently we need a separate match  $xhtml_slash = preg_match('%\s?/\s*$%', $attrlist) ? ' /' : '';
  $attrlist = preg_replace('%(\s?)/\s*$%', '\1', $attrlist);
      
  $match = $string;
  if(preg_match('/style="[^"]*width: *[0-9]*px/i',$match) || preg_match('/style="[^"]*height: *[0-9]*px/i',$match)){
     $width=preg_replace('/.*style="[^"]*width: *([0-9]*)px.*/i','\1',$match);     $height=preg_replace('/.*style="[^"]*height: *([0-9]*)px.*/i','\1',$match);
   }  
  // Clean up attributes
  $attr2 = implode(' ', _filter_xss_attributes($attrlist));
  $attr2 = preg_replace('/[<>]/', '', $attr2);  $attr2 = strlen($attr2) ? ' '. $attr2 : '';
    
  if ($width || $height) {
    $attr2 .= ' style="'.($width ? 'width: '.$width.'; ' : '').($height ? 'height:'.$height.';' : '').'"';
  }   
  return "<$elem$attr2$xhtml_slash>";
jeffcd’s picture

Status: Active » Closed (duplicate)

I am going to call this a duplicate of: http://drupal.org/node/291835 since it has more information.