SketchFab Media links #408

Open
opened 2026-01-29 14:35:58 +00:00 by claunia · 2 comments
Owner

Originally created by @LukeTOBrien on GitHub (Oct 30, 2020).

Hello there

Do you think you could add SketchFab to your Media Extensions?
So you could have:

![Title goes here](https://skfb.ly/6stSI)

The embed code for SketchFab is much longer then YouTube though, for the above model the embed HTML is:

<div class="sketchfab-embed-wrapper">
    <iframe title="Title goes here" width="640" height="480" src="https://sketchfab.com/models/1e03509704a3490e99a173e53b93e282/embed?autostart=0&amp;ui_controls=1&amp;ui_infos=1&amp;ui_inspector=1&amp;ui_stop=1&amp;ui_watermark=1&amp;ui_watermark_link=1" frameborder="0" allow="autoplay; fullscreen; vr" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe>
    <p style="font-size: 13px; font-weight: normal; margin: 5px; color: #4A4A4A;">
        <a href="https://sketchfab.com/3d-models/the-rosetta-stone-1e03509704a3490e99a173e53b93e282?utm_medium=embed&utm_source=website&utm_campaign=share-popup" target="_blank" style="font-weight: bold; color: #1CAAD9;">The Rosetta Stone</a>
        by <a href="https://sketchfab.com/britishmuseum?utm_medium=embed&utm_source=website&utm_campaign=share-popup" target="_blank" style="font-weight: bold; color: #1CAAD9;">The British Museum</a>
        on <a href="https://sketchfab.com?utm_medium=embed&utm_source=website&utm_campaign=share-popup" target="_blank" style="font-weight: bold; color: #1CAAD9;">Sketchfab</a>
    </p>
</div>

So you might have to trim this down.

SketchFab also has a REST API, so it could be possible to HTTP.Get and await the user name, description and other information of the model.

What do you think?

Originally created by @LukeTOBrien on GitHub (Oct 30, 2020). Hello there Do you think you could add [SketchFab](https://sketchfab.com/) to your [Media Extensions](https://github.com/lunet-io/markdig/blob/master/src/Markdig.Tests/Specs/MediaSpecs.md)? So you could have: ```markdown ![Title goes here](https://skfb.ly/6stSI) ``` The embed code for SketchFab is much longer then YouTube though, for the above model the embed HTML is: ```html <div class="sketchfab-embed-wrapper"> <iframe title="Title goes here" width="640" height="480" src="https://sketchfab.com/models/1e03509704a3490e99a173e53b93e282/embed?autostart=0&amp;ui_controls=1&amp;ui_infos=1&amp;ui_inspector=1&amp;ui_stop=1&amp;ui_watermark=1&amp;ui_watermark_link=1" frameborder="0" allow="autoplay; fullscreen; vr" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe> <p style="font-size: 13px; font-weight: normal; margin: 5px; color: #4A4A4A;"> <a href="https://sketchfab.com/3d-models/the-rosetta-stone-1e03509704a3490e99a173e53b93e282?utm_medium=embed&utm_source=website&utm_campaign=share-popup" target="_blank" style="font-weight: bold; color: #1CAAD9;">The Rosetta Stone</a> by <a href="https://sketchfab.com/britishmuseum?utm_medium=embed&utm_source=website&utm_campaign=share-popup" target="_blank" style="font-weight: bold; color: #1CAAD9;">The British Museum</a> on <a href="https://sketchfab.com?utm_medium=embed&utm_source=website&utm_campaign=share-popup" target="_blank" style="font-weight: bold; color: #1CAAD9;">Sketchfab</a> </p> </div> ``` So you might have to trim this down. SketchFab also has a [REST API](https://docs.sketchfab.com/data-api/v3/index.html), so it could be possible to `HTTP.Get` and `await` the user name, description and other information of the model. What do you think?
claunia added the enhancementPR Welcome! labels 2026-01-29 14:35:58 +00:00
Author
Owner

@xoofx commented on GitHub (Oct 30, 2020):

It is a bit more involving than the media extensions that we have today as we don't perform any HTTP queries when parsing the Markdown document while your code above seems to require this.
It's a bit specific also, so for now, I think you can roll your own as Media extensions has some kind of extension mechanism via IHostProvider and see how it goes. SketchFab might be too specific audience to include it for now...

@xoofx commented on GitHub (Oct 30, 2020): It is a bit more involving than the media extensions that we have today as we don't perform any HTTP queries when parsing the Markdown document while your code above seems to require this. It's a bit specific also, so for now, I think you can roll your own as Media extensions has some kind of extension mechanism via [`IHostProvider`](https://github.com/lunet-io/markdig/blob/master/src/Markdig/Extensions/MediaLinks/IHostProvider.cs) and see how it goes. SketchFab might be too specific audience to include it for now...
Author
Owner

@LukeTOBrien commented on GitHub (Oct 30, 2020):

Okay doke, I will take a look at IHostProvider, thanks!

@LukeTOBrien commented on GitHub (Oct 30, 2020): Okay doke, I will take a look at IHostProvider, thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#408