Closed (fixed)
Project:
IMCE
Version:
6.x-2.2
Component:
Documentation
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
20 Jul 2011 at 15:42 UTC
Updated:
23 Aug 2011 at 21:11 UTC
Hello,
I am using WYSIWYG with IMCE and the IMCE Bridge. The Process I run to inset an image is as follows ...
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
Comment #1
mdumka commentedOk ... 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.
Comment #2
Abhinesh Sharma commentedI 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 ...
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 :)
Comment #3
drupal_imce commentedfix the problem,absolutely, you are genius!!!
Comment #4
dkalish commentedThe fix at #1 worked for me except the line to edit is line 463 (tinyMCE 3.4.4).