no caption appears and class="caption" gets stripped

gafir777 - March 26, 2009 - 19:09
Project:Image Caption
Version:6.x-2.3
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

Hello, I'm using the wysiwyg module along tiny MCE, IMCE and the wysiwyg filter module to have images appear. I'd like to use the image caption module to add a caption.

In my wysiwyg filter input format, all attributes and most styles are allowed for the img tag.
(in wysiwyg filter: img[*] allows everything).

Now, I have the advanced image plugin enabled in my tinymce, and i have added .caption { } to my layout.css, which is supposed to be the used css for tinymce.

If I add a title description with advanced image and set the img tag's class as caption, no caption appears in tiny mce.
Here is how the img tag looks in html in tinymce:
<p style="text-align: center;"><img class="caption" style="border: 0pt none; margin: 5px; vertical-align: bottom;" src="/sites/default/files/atlanticthumb.jpg" border="0" alt="signs books at Atlantic Books" title="signs books at Atlantic Books" width="250" height="375" /></p>
I do not see any caption in tinymce.

Once I save the page, it looks like the img tag class has been stripped, although I do not see why:
<p style="text-align:center"><img style="border:0pt none; margin:5px" src="/sites/default/files/atlanticthumb.jpg" border="0" alt="signs books at Atlantic Books" title="signs books at Atlantic Books" width="250" height="375" /></p>

and in the output I don't see the caption either.

I really don't understand what teh problem is. Are captions supposed to appear in TinyMCE wysiwyg mode? In this case, while the class="caption" is there, why doesn't it show up? Second, why is my class="caption" being stripped when everything is allowed for the img tag, that's another issue...

Thanks for your help.

#1

gafir777 - March 26, 2009 - 19:12

I'm not sure where the source of the problem is, so many modules are involved...

#2

gafir777 - March 26, 2009 - 19:48

---

#3

gafir777 - March 26, 2009 - 19:47

--

#4

gafir777 - March 26, 2009 - 19:47

--

#5

davidwhthomas - March 26, 2009 - 21:29

Image caption won't show captions in edit mode / tinymce, it is activated on the node view.
You may need to set the admin > site config option to include your content type in captioning
As for why the class is being stripped from the img tag, that's outside the scope of this module and due to some other configuration you have there.
DT

 
 

Drupal is a registered trademark of Dries Buytaert.