Closed (fixed)
Project:
TinyMCE
Version:
master
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
9 Mar 2007 at 21:32 UTC
Updated:
24 Nov 2008 at 18:52 UTC
The TinyMCE module's "convert fonts to styles" setting doesn't work because in TinyMCE (from Moxiecode) the config parameter is actually convert_fonts_to_spans (see TinyMCE's documentation). In the TinyMCE module's code this appears erroneously as convert_fonts_to_styles). Simply renaming the parameter where it occurs in the module seems to solve the problem.
I've attached a patch for review. Special thanks to ejhildreth for assistance tracking down this issue.
I believe other versions of the module contain this issue as well, but haven't had a chance to check.
mlsamuelson
| Comment | File | Size | Author |
|---|---|---|---|
| tinymce.module_fonts_to_spans.patch | 1.92 KB | mlsamuelson |
Comments
Comment #1
m1mic commentedsubscribing
Comment #2
kreynen commentedThanks. I need to look into this more closely, but at first glance I think you are right. If so, I'll role this into the next update.
Comment #3
mlsamuelson commentedGreat, kreynan.
I should probably have noted I tested with Tinymce 2.1.0.
Also, this appears like it could be a related issue (not in a bug way, but an issue way): http://drupal.org/node/84797 .
mlsamuelson
Comment #4
m1mic commentedThe same technique that was used in the patch works on Drupal 4.7.6, TinyMCE 4.7, with Moxie Code's TinyMCE 2.0.6. Changed out convert_fonts_to_styles with convert_fonts_to_spans in the .module file
Comment #5
badbuta commentedI have applied the patch. It works!
However, when I submit the content and reopen it. TinyMCE does not show me the text color what I did before. If I read the HTML code using "Disable/Enable Rich-text", the tag is placed exactly there. The page view does not have any problem for the tag style. This problem only appears in the TinyMCE editor area. In addition, it also happens when I toggle the Rich-text before submit.
On the other hand, according to other thread/post, I have tried to add another setting like "Cleanup: true/false" within tinyMCE.init block. But.... it does not fix the problem.
Is it a Module bug or TinyMCE's bug?
Comment #6
mlsamuelson commentedPerhaps an issue with using the HTML input filter? If you change your input format to Full HTML (if you aren't already) does the styling come through?
I need to look into it futher, but I believe the HTML filter strips out the style attribute in span tags.
mlsamuelson
Comment #7
eaton commentedSubscribing to this issue -- I've run into the same problem. I'll test this when I get a chance.
Comment #8
badbuta commentedI have tried Full HTML filter. The problem is still there.
I also verify the generated source code. The tag is there.
Just want to clarify that the style (color) does not show up ONLY in the WYSIWYG editor. Node page display is normal.
Comment #9
m1mic commented@badbuta -- This is not an issue with the TinyMCE module itself. Rather, it is a known bug with Moxie Code's TinyMCE javascript (the code you put in the tinymce/tinymce folder). If you go look at their issue queue on SourceForge, you can find a couple of references to this. For example, see http://sourceforge.net/tracker/index.php?func=detail&aid=1678361&group_i... or http://sourceforge.net/tracker/index.php?func=detail&aid=1677164&group_i... as two examples.
Comment #10
badbuta commentedI see.
So, I can only wait for the TinyMCE bugfix.... :-<
Comment #11
m3avrck commentedThanks fixed!
Comment #12
mlsamuelson commentedSweet. Thanks!
Comment #13
(not verified) commentedComment #14
udig commentedI spent days on the annoying behavior described by badbuta... before I was able to resolve / workaround it.
goto TinyMCE profile -> 'cleanup and output'. change 'Convert tags to styles' from True to False. This will allow you to see the changes you've made to the text using the text color when re-editing.
Note that I merely used trial and error method here so I can not really tell if this is a 'correct' solution. Generally speaking allowing the use of font tags is not recommended - see http://www.webreference.com/html/tutorial22/
Anyhow I hope this gives whomever need some direction...
Comment #15
cozzi commentedThis has become a huge time sink for me.
Selecting "Filtered HTML" inhibits the use of inline text colors and I can't figure out why? I've made sure that all tags being used in the post are allowable tags by my HTML filter. Yet, when I switch to Full HTML the inline text color shows.
I'm running 5.x with Drupal's WYSIWYG module with TinyMCE. I honestly don't see how this is a TinyMCE issue noted above since a switch to FULL HTML solves the problem - but I clearly I can't give my users "Full HTML". Note: I do understand that TinyMCE should probably be converting to styles verses span but span works with Full HTML, why?
I've tried the note from post #14 but it did not work for me.
thank you
Cozmo
Sorry - I realize now that this post should really have been put in the wysiwyg api area. (I would have deleted it but I don't see how I can.)