Hello,

I am using WYSIWYG with IMCE and the IMCE Bridge. The Process I run to inset an image is as follows ...

  • Click image button
  • Click the browse button
  • Using the file browser I select an image and click insert file
  • The picture is now shown in the preview window
  • Click the insert button

Now this is where a broken image is now displayed in the TinyMCE editor window. When I view the source this is what I get ...

<img id="__mce_tmp" />

I have no idea what I am doing wrong

Comments

mdumka’s picture

Ok ... I think I found the fix here: http://drupal.org/node/1197972#comment-4666534

To make it simple ... follow the instructions to edit:

/sites/all/modules/wysiwyg/editors/tincymce.inc

On Line 453 ... Sure hope that helps someone fix this quicker then I did.

Abhinesh Sharma’s picture

Version: 7.x-1.2 » 6.x-2.2
Category: support » task
Priority: Normal » Critical
Status: Active » Fixed

I am Using WYSIWYG with and the IMCE Bridge. The Process I run to inset an image is as follows ...

WYSIWYG –> 6.x.2.4
IMCE –> 6.x.2.2
IMCE Bridge –> 6.x.1.1
Tiny mce –> 3.4.3.2

Click image button

Click the browse button

Using the file browser I select an image and click insert file

The picture is now shown in the preview window

Click the insert button

Now this is where a broken image is now displayed in the TinyMCE editor window. When I view the source this is what I get ...

Only local images are allowed.

Solution :-

Get a span element added to the extended_valid_elements list. The current code doesn't include 'id' as an attribute for spans and it appears that TinyMCE requires this for it's initial image insert. Changing the list of extended valid elements for the font stanza to the following appears to fix the bug:

array('font[face|size|color|style],span[id|class|align|style]'),

Path :-

module/wysiwyg/editors/tinymce.inc

diff -Naur wysiwyg-old/editors/tinymce.inc wysiwyg/editors/tinymce.inc

--- wysiwyg-old/editors/tinymce.inc 2011-07-03 19:58:52.000000000 +0200

+++ wysiwyg/editors/tinymce.inc 2011-07-03 19:38:40.000000000 +0200

@@ -451,7 +451,7 @@

'font' => array(

'path' => $editor['library path'] . '/plugins/font',

'buttons' => array('formatselect' => t('HTML block format'), 'fontselect' => t('Font'), 'fontsizeselect' => t('Font size'), 'styleselect' => t('Font style')),

- 'extended_valid_elements' => array('font[face|size|color|style],span[class|align|style]'),

+ 'extended_valid_elements' => array('font[face|size|color|style],span[id|class|align|style]'),

'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/font',

'internal' => TRUE,

),

Line No :- 463

'extended_valid_elements' => array('font[face|size|color|style],span[class|align|style]'),

Replace with :-

'extended_valid_elements' => array('font[face|size|color|style],span[id|class|align|style]'),

I thinks above information fixed all the problem :)

drupal_imce’s picture

fix the problem,absolutely, you are genius!!!

dkalish’s picture

The fix at #1 worked for me except the line to edit is line 463 (tinyMCE 3.4.4).

Status: Fixed » Closed (fixed)

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