Closed pparik closed 1 year ago
Trying to find a workaround for this problem, I changed the getPType() function into the plugins/imagebox/syntax.php file:
function getPType(){ return 'normal'; }
Now I get the <p></p>
tags as expected with normal images.
I did not experimented with image alignment (left, center, rights) and really I don't understand the implications of such a change.
It's not allowed to put block elements like divs
or fig
inside a p
element.
The img
is an inline element, which could be placed inside of an p
element.
We have to use an block element here to store the caption.
Boxed images do not respect paragraphs (i.e. if there is an empty line in between) as normal images do.
Case 1
produces
<p><img><img></p>
.Case 2
produces
<p><img></p><p><img></p>
.Boxing the images using
[]
gets the same result in both cases (<div>
s next to each other,<p>
s are not used at all). Fixing this issue will at least allow tweaking everything else in userscript.js and userstyle.css.P.S. It would be perfect if the boxed images behave EXACTLY like normal images (with respect to paragraphs, margins, etc.).
Anyways, thanks for your work!