ozntel / oz-image-in-editor-obsidian

This Obsidian plugin to view Images, Transclusions, iFrames and PDF Files within the Editor without a necessity to switch to Preview.
339 stars 13 forks source link

[BUG] Image Widget in Codeblock #6

Closed renmu123 closed 3 years ago

renmu123 commented 3 years ago

image

l think it should be not rendered in code blocks If someone depends the feature, a switch can be added to crontrol this action.

ozntel commented 3 years ago

Hi @renmu123, to be honest, it didn't come to my mind that someone would add an image in a code block :) I searched for some options but it is quite hard to get line classes for the moment. As a temporary solution, you can add the following CSS so that it is not visible within your code blocks even though you will have the widget in your DOM:

pre.HyperMD-codeblock + div.oz-image-widget {
  display: none !important;
}

Hope this helps.

renmu123 commented 3 years ago

thanks