[wp-trac] [WordPress Trac] #9066: editor_plugin.js adds "hard-coded"
inline-style for width+10px which makes it hard for theme
development
WordPress Trac
wp-trac at lists.automattic.com
Sat Feb 7 21:42:34 GMT 2009
#9066: editor_plugin.js adds "hard-coded" inline-style for width+10px which makes
it hard for theme development
--------------------------+-------------------------------------------------
Reporter: sporketeer | Owner: azaozz
Type: defect (bug) | Status: new
Priority: high | Milestone: 2.7.1
Component: JavaScript | Version:
Severity: normal | Keywords: inline style, theme problems
--------------------------+-------------------------------------------------
In '''/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js''' in
'''line 122''' additional 10 pixels get added to the value entered by a
user. This might seem okay if you are using the default theme and some
other themes, but it is bad markup making it hard for theme developers to
change things around.
Example for a problem:
An image gets uploaded and has a width of 300 pixels. When a caption gets
used the following mark-up is being created:
{{{
<p><div id="attachment_118" class="wp-caption alignleft" style="width:
310px"><img src="http://www.domain.com/wp-
content/uploads/foto-2-300x225.jpg" alt="…
}}}
the div has a class and an id so there is no need for inline styles,
especially not if it inserts some weird width attribute which someone
thought to be appropriate. CSS is great for styling but please leave the
styling to the theme's CSS!
So the additional 10 pixels should be taken out, please.
A picture of x pixels in width should be within a div of no size
whatsoever, at least not inline styled width.
Thank you!
--
Ticket URL: <http://trac.wordpress.org/ticket/9066>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list