21309 Posts in 5738 Topics by 2603 members
| Go to End | ||
| Author | Topic: | 4960 Views |
-
Re: TinyMCE - howto image without surrounding div

11 December 2010 at 1:14am
p is for paragraphs, and the images in my content do not relate directly to singular paragraphs but, rather, the section of the text in general. All other styling issues you cite can easily be handled with CSS.
Thanks for mentioning the HTMLEditorConfig. I'll take a look and see if it can be tweaked accordingly.
-
Re: TinyMCE - howto image without surrounding div

11 December 2010 at 3:01am Last edited: 11 December 2010 3:17am
Well, I hope you've read the advice for the current state of the HTML5 working draft.
The HTMLEditorConfig won't do you any good for this specific... habit for the image tag and I advise you to get this to the TinyMCE community. But they will tell you pretty much the same as I did. No offense. -
Re: TinyMCE - howto image without surrounding div

2 February 2011 at 11:36pm
> I don't get the problem why a image should not get wrapped in a paragraph...
As David said, an image should be able to float beside multiple paragraphs. There is no better way to do that to my knowledge than to float the img and let the other h1, h2, p etc just be regular elements with no special style.
> However, you can disable the automatic paragraph via HTMLEditorConfig but this is simply nonsense and imho bad style of coding.
Assuming your way of writing articles is the only way is narrow minded. Many articles contain long images that will require floating beside many pargraphs and even headings.
The current model where the image gets the style, and the parent div/p doesn't get it is useless imo and is a bad style of coding.
On our site we added a class that can be set on the p/div (pFloatRight) which makes the paragraph (or div) float instead.
The real problem is that TinyMCE automatically embedds the img in a p if there is no subtitle. When there is a subtitle and the div is added it works as me and David intended.
| 4960 Views | ||
| Go to Top |



