-
- 285 Posts
I have TinyMCE 2.1.1.1 running on 0.9.6, and I’m having a problem I’m not sure how to fix.
Basically, TinyMCE is stripping empty alt attributes (alt=""). It leaves alt alone when it’s not empty, though.
Anyone know how to fix that, because I want the option for empty alt to be available.
-
- 1,131 Posts
Err...not to be silly but what is the reason for wanting empty alt attributes? I think TinyMCE strips them out simply because an empty attribute doesn’t really serve any purpose. Now, if its due to a Javascript function needing an alt attribute to work...well...I’d probably rework the script to automatically add the attribute in if it’s missing. This is more of a question for the Moxiecode people but my opinion is that this is not a bug but a feature. If you don’t want TinyMCE to mess with your code, try turning off the Cleanup option.
Jeff Whitfield
"I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
Validation. Fails without the alt="" (even if it’s blank it passes!).
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
- 1,131 Posts
But isn’t that only on IMG and INPUT tags? If you’re inserting in an image, why wouldn’t you add a description to populate the ALT attribute with?
Jeff Whitfield
"I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
Turning off the cleanup configuration option should take care of it. There’s also probably a list of items that it will strip out (or one that can be set to ignore...).
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me