judebert wrote:Wouldn't the inexperienced users tend to use the editor buttons for media insertion?
Yes, of course. I'd even say that experienced users also tend to use the editor buttons, simply because it's way simple to add media to entries than by adding the code manually.
Actually, the code presented on my demo pages is supposed to be inserted by serendipity_editor.js
if somebody uses the editor buttons. It's not meant to be inserted into entries manually, just in case that wasn't obvious
judebert wrote:And in that case, does it matter whether there's inline styles or not?
Imagine inserting the new code without
any inline styles. What would be missing in the various cases?
Without captions/image comments:
* .serendipity_image_center: without "display: block; margin: 0 auto;", the image wouldn't be centered
* .serendipity_image_single: that one would be okay - it doesn't have any inline styles

* .serendipity_image_left: without "float: left; margin-right: 5px;", the image wouldn't be floated at all; the margin-right wouldn't be that bad, but it wouldn't look too well, either
* .serendipity_image_right: see .serendipity_image_left, just switch sides
Basically, without inline styles, every image would look just like .serendipity_image_single. No floats, no alignment.
Now,
with captions/image comments, these would also apply. There would be neither floating nor horizontal alignment without inline styles. Plus, I'm using a definition list here, which would be styled according to browser default, which means the caption/image comment would be indented.
That's what I mean by "basic styling" and "functionality" - floating, horizontal alignment and margin are basic "functions" of the images which are also assigned to them in out media-db-insertion dialog (which would need to be altered also, the additional class needs to be added to it). Whenever $USER inserts an image, he/she also selects how to align it.
Now, if you're using a template which doesn't have any styling for images from the media db, choosing this alignment is pointless, which is why I vote for inline styles, although I don't like them. They're the best way to assure that images are at least aligned the way they're supposed to be aligned. All the other styling (borders, colors, text-size and font) are just eye-candy and should be added in the template's style.css.
judebert wrote:Or is it really a problem of compatibility with existing entries that already have inline styles?
Uh. Jude, that's quite a bombshell - I hadn't even thought about that ... hmmm. Actually, I think with these changes, there
is no backwards compatibility, and frankly, I don't think that can be done. Hohum. Let me check. (That might take a few days, I'm working over Xmas.)
Any chance we could provide some kind of script which alters the code for inserted images in the entries of a blog? Something like s/old code/new code/ for all entries in the database?
YL