Closed grivkees closed 10 years ago
sorry, problems with markdown, makes sense now (hopefully)
Investigated this more... the issue here is that it is invalid HTML to have a block element, such as a blockquote or figure, nested under<p>
.
The embed tags need to be moved up in the dom and be at the same level as the <p>
in order for it to be valid. Right now the browser is freaking out since there is a block element under a <p>
and making up its own HTML which pushes the block element out, does weird stuff with the spans and i's that might have been there, and ends up wrapping the remaining text in a span and not a p, which messes up the text display.
The embed tag thing needs to be adjusted to not put the rendered html where the tag was, but rather before or after the containing paragraph.
Embed tags are currently being put into articles as such:
Which resolves after the tag is expanded to
Except if I try to change the span with the image to be a figure, in that case it does
If I change the html for the content tag to just output:
it works, but if I do
it doesn't.
https://github.com/dukechronicle/chronline/blob/master/app/models/post/embedded_media/image_tag.rb
@jimpo @themichaellai @akyker20 thoughts? Ideally I think it should be
The figure should not be within the