I figured this would have been asked already, but I do not see a posting in the forum. I am using Revo 2.2 with TinyMCE editor installed. When a user includes an image in their document using the image button in TinyMCE and includes an image description, is there a way to include that description as the caption underneath the image?
I'm not concerned about the formatting of the content ... I just can't figure out how to get the content. I just need a tag that provides the image description. I suppose I could just find where it is stored in the db and write a query if nothing is readily available.
I like the jquery idea, but my problem is TinyMCE does not surround the image with a block tag. When a user places an image within the content using TinyMCE they can choose to float the image left or right. By tacking on a <p>caption</p> to the end of the image, that line will not follow the float since it will end at the image tag. It would be easier to write a script if the image was ALWAYS in the same location and there was always an image included, but neither is true.
[ed. note: leemchildress last edited this post 14 years, 4 months ago.]
I guess I could write a plugin which replaces each image tag with a wrap and includes the alt as a caption. Hmmm, may give that a shot.
-
☆ A M B ☆
- 326 Posts
Sorry for the slow response; I didn't realize email notifications were down. What I was suggesting with JQuery does basically that, but a plugin could do it, too.
On a somewhat related note, I submitted an extra last week called ContentVampire (still waiting for approval) that does sort of what you're wanting. On resource save, it parses through the content field, finds all image and link tags, and saves them to a JSON string in a template variable. That way, you can work with richtext-added content just like you would if it had been added directly to the TV.