Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(markdown): add style to markdown content for better images placement #3115

Merged

Conversation

NinjaKinshasa
Copy link
Contributor

fix #3091

  • style of titles changed from block to inline-block + width 100% to avoid overlapping with images
  • style of markdown-content changed to overflow : auto to prevent images to overflow the markdown container

@brunobesson
Copy link
Member

Thanks for your PR!

I see a problem : images are positioned to the right, but "out of content", while the content should give space to the image.
Similar to word-like documents image positioning.

@NinjaKinshasa
Copy link
Contributor Author

Thank you for your reply, can you provide a visual exemple of the expected result, or a screen of the problem with the result generated with my code ?
If I understand your comment, your concern is that the image is displayed under the text instead of being displayed on the same row. Actually, the image goes under the text only when the image tag is under the text in the original markdown. To display the image and the text on the same row, the image tag should be above the text in the markdown, like in html/css.

Here is an exemple :

title (1)
img (2)
text (3)
img (4)
text (5)
title (6)
img (7)
text (8)

prev

I understand that merging this PR will probably mess up the appearance of some publications, but I do not see a better tradeoff to fix the current issue while only applying css to markdown code. Do you think to something else ?

@brunobesson
Copy link
Member

Indeed, my bad!
I assumed another approach, so didn't think of the image positioning in markdown code.

Everything's fine for me then.

@brunobesson brunobesson changed the title Issue 3091 : added style to markdown content for better images placement feat: add style to markdown content for better images placement Dec 9, 2022
@brunobesson brunobesson changed the title feat: add style to markdown content for better images placement fix(mrkdown): add style to markdown content for better images placement Dec 9, 2022
@brunobesson brunobesson changed the title fix(mrkdown): add style to markdown content for better images placement fix(markdown): add style to markdown content for better images placement Dec 9, 2022
@brunobesson brunobesson added the bug Something isn't working label Dec 9, 2022
@brunobesson brunobesson merged commit f017e70 into c2corg:master Dec 9, 2022
brunobesson pushed a commit that referenced this pull request Dec 29, 2022
…-above-hline"

This reverts commit f017e70, reversing
changes made to b963e2b.

# Conflicts:
#	src/components/generics/Markdown.vue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Images should be above hline coming from sections
2 participants