It seems that in the latest versions of TinyMCE (3.4.3), using wysiwyg_template breaks the image insertion functionality.
When you try to insert an image with the editor, the image comes up empty with border=0 as only attribute.
I tracked the problem down to the following line:

'extended_valid_elements' => array( //tinymce specific - allows additional elements to be used
    'img[class|src|border=0|alt|title|width|height|align|name|style]',
),

The way to solve it is to add the "id" attribute in the list of allowed attributes.
It looks like TinyMCE add a temporary id to the image before transferring it to the textarea and if "id" is not allowed, everything is stripped out in the img tag.

If other people have the same problem, I've attached a patch which should fix it.

CommentFileSizeAuthor
wysiwyg_template_add_id_img_attr.patch564 bytestlaurent
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

guybedford’s picture

Status: Patch (to be ported) » Closed (fixed)

This has been committed to both the 6.x and 7.x latest releases. Thanks for your contribution.