Git Product home page Git Product logo

Comments (13)

sbarex avatar sbarex commented on July 19, 2024 1

on release 18 should be fixed (also support for animated .webp).

from qlmarkdown.

setanarut avatar setanarut commented on July 19, 2024 1

I think, you should write this in the documentation. --> "This option must be selected for SVG preview" Ekran Resmi 2021-02-14 02 17 47

from qlmarkdown.

sbarex avatar sbarex commented on July 19, 2024

The .svg and .webp images are in the same folder of the markdown file?
On my mac the svg and webp preview works.

In the app editor if you write by hand the code the images are searched from the resource bundle of the app. Otherwise if you open an .md file, the basedir is the folder of the .md file.

from qlmarkdown.

setanarut avatar setanarut commented on July 19, 2024

The .svg and .webp images are in the same folder of the markdown file?
On my mac the svg and webp preview works.

In the app editor if you write by hand the code the images are searched from the resource bundle of the app. Otherwise if you open an .md file, the basedir is the folder of the .md file.

Yes, The .svg and .webp images are in the same folder. I tested every condition, it doesn't work for me.

Ekran Resmi 2021-01-19 01 08 21

![test](./test.svg)

from qlmarkdown.

sbarex avatar sbarex commented on July 19, 2024

Can you share the .md and .svg file?

from qlmarkdown.

setanarut avatar setanarut commented on July 19, 2024

@sbarex https://yadi.sk/d/HZ0pKfqjy0LO-g

from qlmarkdown.

sbarex avatar sbarex commented on July 19, 2024

Please try release 17.

Regarding the preview of the videos I don't think to implement it. Security restrictions prevent you from accessing video files from the quick look preview.
An extension should be created that analyzes the .md file looking for html code containing a video, reads the file, obtains the preview and inserts it in the formatted html code...
Moreover Apple does not directly manage many video formats (webm, mkv, avi, ...) and you should use external libraries such as ffmpeg.
A lot of work for a non-standard functionality for the .md language.

from qlmarkdown.

setanarut avatar setanarut commented on July 19, 2024

Please try release 17.

Regarding the preview of the videos I don't think to implement it. Security restrictions prevent you from accessing video files from the quick look preview.
An extension should be created that analyzes the .md file looking for html code containing a video, reads the file, obtains the preview and inserts it in the formatted html code...
Moreover Apple does not directly manage many video formats (webm, mkv, avi, ...) and you should use external libraries such as ffmpeg.
A lot of work for a non-standard functionality for the .md language.

Thanks, video thumbnails is not important. SVG fixed but WEBP is still not displayed. ![test](./webp_test.webp)

from qlmarkdown.

setanarut avatar setanarut commented on July 19, 2024

Quick Look doesn't play animated webp by default. I think QLMarkdown should show static WebP.

from qlmarkdown.

sbarex avatar sbarex commented on July 19, 2024

In the terminal, what is the output of this command?

$ file --mime-type PATH_OF_WEBP_FILE

It should be image/webp.
Also, if the QLMarkdown app in on the Applications folder try this command:

file --mime-type -m /Applications/QLMarkdown.app/Contents/Resources/magic.mgc PATH_OF_WEBP_FILE

The result should always be image/webp.

Can you provide a webp animated file?

from qlmarkdown.

setanarut avatar setanarut commented on July 19, 2024
➜  Desktop file --mime-type ./webp_test.webp                   
./webp_test.webp: image/webp
➜  Desktop file --mime-type -m /Applications/QLMarkdown.app/Contents/Resources/magic.mgc ./webp_test.webp 
./webp_test.webp: image/webp

webp images
https://developers.google.com/speed/webp/gallery1

from qlmarkdown.

setanarut avatar setanarut commented on July 19, 2024

@sbarex SVG works if this option is selected. but this is not inline HTML code -> ![test](./test.svg). This is a valid Markdown syntax. This is confusing for the end user. Indicates that these options are unreliable.

Ekran Resmi 2021-02-14 02 17 47

from qlmarkdown.

sbarex avatar sbarex commented on July 19, 2024

This behavior is caused by cmark.

When html content is not allowed, it automatically performs a series of extra checks in search of dangerous content. For the images, it checks their url, removing any it thinks are not safe. In the case of the data: scheme (used to embed the image file inside the html output preventing the security limitation of the Quick Look engine) only these mime types are allowed: image/png image/gif, image/jpeg, image/webp.

from qlmarkdown.

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.