Strictly speaking, this could be not a issue for this module (I'm sorry if this is WAY off topic) but I have noticed that in some of the files in this module, there is a placeholder for __description__ which is not available as an option in the default field_image D7 widget.

Can anyone provide a description / route / map on the possibility of adding this extra input field to any given image so there is a way of adding the alternate text, the title and a description of the image (used sometimes as a caption)…?

Many thanks for the advice.

Comments

quicksketch’s picture

The "description" text still exists, but only when inserting a file from a File field (as opposed to an Image field). There isn't any way that I know of to add a description to an Image field currently. I think http://drupal.org/project/file_entity is the best option for the future, but I don't think it is fully baked as of now.

dooug’s picture

Title: ALT, Title and Description » ALT, Title and Description - add extra input field
Category: task » feature
isimgt’s picture

Snater’s picture

Version: 7.x-1.1 » 7.x-1.x-dev

I am browsing through old tickets while working on the module's D8 version. I think having this directly in Insert is out of scope for the module. On the other hand, while File Entity and Media module allow adding additional fields to file entities, the workflow of adding media via File Entity or Media is quite different and features a complexity Insert is trying to avoid. As mentioned, the __description__ placeholder refers to the generic file field's description input.

Yet I suppose it is possible to implement a custom field by overriding the insert button template with a template that adds another text box somewhere next to the button. Additionally, some custom JavaScript needs to be attached to the form: Listening to the insertIntoActiveEditor event triggered on the insert button, the additional field's value could be grabbed and inserted into the template before placing it in the editor. (Might want to override the image-insert-image template to have a placeholder as replacement target.)

I think this is a feasible customization. I am going to close this ticket "works as designed", if no objection arises.

In order to blend better into the layout, it should of course also be possible to extend core's image module field widget with another text box via a custom module. It would just require a different CSS selector in JavaScript when retrieving the value.

The module's D8 version, as of 8.x-2.0, will support native captions, interfacing to the responsible CKEditor plugin.

Snater’s picture

Status: Active » Closed (works as designed)

As per last comment.