-
-
Notifications
You must be signed in to change notification settings - Fork 873
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
Images are wrapped in a p tag #93
Comments
Only because the current parser emits a paragraph. In v3 you have the option to manipulate the AST before rendering, which should make unwrapping images pretty simple. I'll get back to you with an example once v3 is released. |
I found a work around. I'm just checking whether it contains an image and return only the image. |
Can we get an example of how to do this in v3? |
@rexxars How can we achieve this is v3? How can we make it not wrap the output in a paragraph? :) |
@iremlopsum mind providing an example of how you did this? |
@wallawe something like this should work.
|
you're the man, thank you |
This syntax is not valid for current version (6.0.2). What should we do now? Edit: Could achieve it using a plugin: https://www.npmjs.com/package/remark-unwrap-images |
All of the images are wrapped in a p tag, which makes styling images hard. If I set a max-width of a paragraph 600px, but I want the image to be 700px and responsive at that, this becomes awful.
I have to custom render paragraphs, add a class to them, style them based on that. I feel like it would be easier not to wrap images in paragraphs.
Any reason why this is done like this?
The text was updated successfully, but these errors were encountered: