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

FR: Support for CM6? #101

Closed chrisgrieser closed 2 years ago

chrisgrieser commented 2 years ago

I know that Live Preview was pretty much meant to replace the need for plugins like this, but I actually like working in source mode with the exception of images not rendering there.

source mode plus Images rendered would be my preferred working editor, and I assume I am not the only one.

Would it be possible to add support for CM6 for this plugin? 🙏

ozntel commented 2 years ago

After I saw your message here, I started to learn about CM6. To be honest, it is quite complicated 😄

I think I initially managed to implement image preview. You need to update the plugin to 2.0.0 version and enable render for new editor from the plugin settings to be able to use this function. I kept it turned-off by default since I didn't want to confuse people (Enabling render option will duplicate the images within live preview)

Gradually I can implement the rest of the functions we had for CM5.

Let me know how it works for you

chrisgrieser commented 2 years ago

Thanks for the quick update :)

I (re-)installed the plugin, made sure the "Render in new Editor" is enabled, but it seems it is not rendering at all. Tried restarting Obsidian, too, no change.

ozntel commented 2 years ago

It is weird actually. I just installed in a new vault and it works properly:

image

Which version of Plugin and Obsidian are you on?

Can you try to enable Source Mode and then restart the vault?

chrisgrieser commented 2 years ago

Plugin version 2.0.1 Obsidian version 0.13.14

made sure "render in new editor" is checked. have restarted Obsidian. I am in source mode the whole time and have it as default mode, too.

ozntel commented 2 years ago

I just recorded a video from a new vault:

https://youtu.be/L9fJM2jCPlU

Can you maybe follow the same? It is hard to know what is blocking in your case :-)

chrisgrieser commented 2 years ago

huh, not sure what happened here, I restarted Obsidian once again and now it works? 🤔

Maybe some weird caching issue? Whatever, thanks anyway, I'll report back when new problems occur!

ozntel commented 2 years ago

I'm glad it is sorted out :)