This is related to #515216: TinyMCE 3: class="mceItem" on images breaks image button and #400482: editor.instance.prepareContent() breaks editor's native markup handling. After inserting an image through FileField Insert into a tinyMCE editor, the image may not be edited. This is caused by WYSIWYG adding an "mceItem" class to the image, which makes it a special non-editable item within the editor (not at all what we want). Sun says that he's fixed this in the 2.x branch, but in the mean time we might want to work around the problem by using the native tinyMCE insertion method until a new release of WYSIWYG fixes this.

This patch makes FileField Insert use the native handling of tinyMCE first, then falls back to WYSIWYG.

CommentFileSizeAuthor
filefield_insert_tinymce.patch1.24 KBquicksketch

Comments

mikey_p’s picture

Status: Needs review » Reviewed & tested by the community

While the real issue may lay with WYSIWYG API, this does solve the problem, and make Filefield Insert usable with TinyMCE.

See the two images for comparison:

Before
After

-Anti-’s picture

Thanks for this.

twod’s picture

Status: Reviewed & tested by the community » Fixed

The Wysiwyg issues were fixed some time ago. There's no longer any need for this patch.

-Anti-’s picture

I still needed to apply this patch six days ago using 'wysiwyg-6.x-2.0' and 'filefield_insert-6.x-1.x-dev'

twod’s picture

Status: Fixed » Reviewed & tested by the community

Oh right, forgot 2.0 was released just days before the fix got in... Reverting status though I doubt you should need to commit this patch, but having it around might be convenient.

philbar’s picture

Same problem.

quicksketch’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks all.

quicksketch’s picture

Status: Fixed » Closed (fixed)

Closing in preparation for closing the queue and moving to the new Insert module.