The Insert module is regularly used in conjugation with WYSIWYGs. If we could couple together Insert with Caption Filter (plue the feature at #696734: Integration with CKEditor or WYSIWYG?), we'd have a really kick-ass WYSIWYG solution (though still requiring 3-5 modules to get it all clicked together).

As users have mentioned here: http://drupal.org/node/696734#comment-4074778 you can already integrate Insert with Caption Filter manually by theming the Insert templates, but we could make this process quite a bit easier by implementing hook_insert_template_info() directly ourselves.

Comments

quicksketch’s picture

This problem is more complicated that I expected. Considering we don't actually want to provide *new* templates, we just want to wrap around the existing ones. More complicated yet, we need access things to like the "Description" or "Title" field in order to do our adjustments. To alleviate this problem, I've submitted a patch in the Insert queue which will be required for further enhancements here. See #1282830: Add JavaScript hook for altering inserted content.

quicksketch’s picture

Status: Active » Fixed
StatusFileSize
new6.65 KB
new6.27 KB

These patches add support for the new Insert hooks added in #1282830: Add JavaScript hook for altering inserted content. The overall patch is a bit more complicated than expected due to the functionality we're adding. The patch does the following:

- Provides an option under the "Insert" category in the Field setting form ("Use title as caption").
- If that option is enabled, renames the "Title" field into "Caption" on the node form.
- If a Title is entered, wraps images in [caption caption="Example caption"]...[/caption] upon being inserted.
- As above, this patch adds support for the current WordPress syntax of [caption caption="..."], making the caption a property on the tag. The old syntax of doing it inline is still supported with no changes. I expect this attribute-approach will be useful when it comes to the WYSIWYG integration.

I've made new 1.1 releases to mark the finished D7 and bug-fixes prior to this patch being integrated. I've committed these changes afterwards, so we can look forward to a 1.2 release with these new features.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

rezvani63’s picture

Version: 6.x-1.0 » 6.x-1.2
Category: feature » support
Priority: Normal » Major
Status: Closed (fixed) » Patch (to be ported)

I have installed caption filter 1.2 and I did all the settings regarding input formats and so on. But still when I use insert image botton, it only inserts image into editor without [caption]...[/caption] codes.
Do I have to apply this patches or they are already integrated into 1.2 version?
Because it's difficult to add [caption] codes for each image manually.
Thanks

quicksketch’s picture

Version: 6.x-1.2 » 6.x-1.0
Category: support » feature
Priority: Major » Normal
Status: Patch (to be ported) » Closed (fixed)

Please do not reopen feature requests as support requests. File a new issue.

quicksketch’s picture

Do I have to apply this patches or they are already integrated into 1.2 version?

These patches are already in 1.2. The caption is only added if you add a caption (through the repurposed image title field) before you insert the image.

rezvani63’s picture

Sorry for that, because this issue is about insert module, I didn't open a new one.
I have caption textbox for image field and I write caption before inserting the image into text, but after insertion still there is no [caption] in body part although I have set all configurations required for it. Do you think is there in conflict with other modules or settings? (When I add [caption] manually it works fine).

rezvani63’s picture

Status: Closed (fixed) » Needs review

Although I have done all of the settings, the "Insert" botton does not include [caption] in the coding. I explained more in #7.
Please check this issue again.

rezvani63’s picture

Status: Needs review » Needs work

Although I have done all of the settings, the "Insert" botton does not include [caption] in the coding. I explained more in #7.
Please check this issue again.

patrickroma’s picture

Same problem here. TinyMCE does not generate the caption-Tags...

medienverbinder’s picture

subscribe

kmonty’s picture

Status: Needs work » Closed (fixed)

Please don't reopen closed tickets. If there is a bug, please open a new issue.