Git Product home page Git Product logo

Comments (11)

Jelmerro avatar Jelmerro commented on June 14, 2024

This is a browser/Electron limitation, as local files are not allowed to load other local files, but I'll see if there's a way around it using custom protocols, ideally in a secure way.

from vieb.

Jelmerro avatar Jelmerro commented on June 14, 2024

I think this just affects images right? Or is there another resource this applies to that I'm not considering? I have a working prototype for images now, but not sure if this is all there is to it. I don't think markdown has video support, right?

from vieb.

Melandel avatar Melandel commented on June 14, 2024

From what I dug into, I do not think so:

  • stackoverflow shows a workaround for youtube
  • I tested with a video in my markdown and the output rendered via { firefox + Markdown Viewer Webext } did not display any video

I would tend to consider that markdown does not have video support

from vieb.

Jelmerro avatar Jelmerro commented on June 14, 2024

Great, that makes things easy for once, I'll have this implemented in V11 (hope to release in a few weeks).

from vieb.

Melandel avatar Melandel commented on June 14, 2024

Thank you for your time and energy always! 😃

from vieb.

Jelmerro avatar Jelmerro commented on June 14, 2024

Implemented in 11.0.0 🎉

from vieb.

Melandel avatar Melandel commented on June 14, 2024

Hello,

Oddly enough when I'm trying today I don't see the image getting displayed.

Given that:

  • I render some/path/markdown.md
  • There is an image at some/path/media/image.png
  • the markdown file refers to the image via ![](media/image.png)
  • Vieb generates the following HTML: <img src="media/image.png" alt=""> when previewing the markdown

Developer Tools indicates the following:
image

While firefox finds and displays the image correctly.

from vieb.

Jelmerro avatar Jelmerro commented on June 14, 2024

Which Vieb version are you using? This is only been fixed in 11.0.0, where I just tried your example with a random image and it works. Are you sure the image exists and you are using 11.0.0? Because I can only reproduce this behavior in older versions of Vieb. Even if the image is missing, it should generate something like this in the HTML:
image
Instead of using the image directly from disk, as that is not allowed. I'm testing it in the repo with this code:
![](app/img/cheatsheet.png) and it works in 11.0.0 for me. Can you show me the file, file structure, Vieb version and the Elements tab of the devtools using some screenshots?

from vieb.

Melandel avatar Melandel commented on June 14, 2024

Hello,

I'm using 11.0.0 and have created a repro where I detailed how to reproduce the behavior I'm witnessing.

It's here

from vieb.

Jelmerro avatar Jelmerro commented on June 14, 2024

Since that very same repo works for me, it might be a Windows only issue, given that paths are fairly different/bad there, so I will look into this when I am back at a Windows machine again.

from vieb.

Jelmerro avatar Jelmerro commented on June 14, 2024

@Melandel I have had the opportunity to work on Windows a short time ago and have made sure both the markdownviewer and filebrowser now work at least when running from source, could you check if the new 12.0.0 release fixes your issue?

from vieb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.