I am using Drupal 6 with Imagecache, IMCE CCK Image, and TinyMCE to place images and captions inline with text in book pages. Everything appears to be working properly except that the caption text is in italics and all in a single wrapped line even if I put in carriage returns when filling out the caption field. I can add
to force line breaks and they appear properly in the caption when viewed normally. However, I do not want my users to have to do HTML if at all possible. Furthermore, if I return to edit that page, all the HTML code is escaped out (< instead of <).
Is there a way to change the format of the caption output so that multi-line text can be used for input? I have searched my various .css and other files but I have not found any references to "caption". I am new to Drupal and do not know php, but any help is appreciated. This is the last issue I need to solve before I take my site live.
My alternative is to use TinyMCE to insert a table with 1 column and 2 rows, and use the top cell for the preview image and the bottom cell for the image caption (but this is not elegant, and I may not be able to use lightbox2 to view the full size image).
My installation:
site running locally: MAMP, MacOS 10.5.7
Drupal 6.12
Garland theme
Modules:
Content 6.x-2.3
IMCE Image 6.x-1.0-beta2
ImageAPI 6.x-1.6
ImageCache 6.x-2.0-beta9
IMCE 6.x-1.2
Lightbox2 6.x-1.9
IMCE Wysiwyg API bridge 6.x-1.0
Wysiwyg 6.x-2.0 (with TinyMCE 3.2.4.1)
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | imceimage_patch_20100104.patch | 721 bytes | dooug |
Comments
Comment #1
dooug commentedFirstly, the css id for the caption is "target-comment". Write some CSS for that will solve your problem of the italics and spacing. I'd recommend the firebug add-on for Firefox as it comes in quite handy for debugging CSS and other issues.
Additionally, I'd like to second that the HTML characters in the caption are recursively escaped when a particular node is edited and saved. I'll try to investigate this module and post a patch if I find an easy fix.
Comment #2
dooug commentedAttached is a patch that prevents the ImceImage caption from being escaped every time the node is edited. The caption's default value is set each time from the existing value that was run through check_plain(). I removed the check_plain(), this might not be the best solution but solved our problem for now.