Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed 3rd party service like Youtube, Tweet, Gist... #206

Open
shashank-k opened this issue Dec 21, 2019 · 9 comments
Open

Embed 3rd party service like Youtube, Tweet, Gist... #206

shashank-k opened this issue Dec 21, 2019 · 9 comments
Labels
funded on issuehunt 💵 Issue has received funding that will be rewarded to the contributor solving this issue. improvement request 🔨 Issue concerns an existing feature that needs improvement.

Comments

@shashank-k
Copy link

shashank-k commented Dec 21, 2019

Issuehunt badges

I am trying to embed github gists into the notes.

If something like this exists, it will be excellent.


IssueHunt Summary

Backers (Total: $7.00)

Become a backer now!

Or submit a pull request to get the deposits!

Tips

@Flexo013
Copy link
Contributor

This is not possible at the moment, but sounds like a useful feature.

@Flexo013 Flexo013 changed the title Is there a way to embed github gists into the notes Embed github gists into the notes Dec 21, 2019
@Rokt33r
Copy link
Member

Rokt33r commented Jan 9, 2020

Sounds good to me. We could exploit ImageReference syntax, ![{description}]({url}), for this.(or introduce other syntax, like [$gist:{gistId}]).

And I found this issue. remarkjs/ideas#9 Although gist doesn't support oembed.

@Rokt33r Rokt33r added the improvement request 🔨 Issue concerns an existing feature that needs improvement. label Jan 9, 2020
@Rokt33r Rokt33r changed the title Embed github gists into the notes Embed 3rd party service like Youtube, Tweet, Gist... Jan 9, 2020
@Rokt33r
Copy link
Member

Rokt33r commented Jan 9, 2020

https://github.com/djm/remark-shortcodes looks quite promising. So I guess we could do make it like [[gist id=1234]].

@issuehunt-oss
Copy link

issuehunt-oss bot commented Jun 12, 2020

An anonymous user has funded $5.00 to this issue.


@issuehunt-oss issuehunt-oss bot added the funded on issuehunt 💵 Issue has received funding that will be rewarded to the contributor solving this issue. label Jun 12, 2020
@Erprincekumarojha
Copy link

You contact me I will try

@Flexo013
Copy link
Contributor

@Erprincekumarojha Feel free to pick up this issue and submit a PR for it. When your PR gets merged you will receive the funding for this issue!

@themagiulio
Copy link

Hi, I'm trying to implement this by using remark-shortcodes as suggested by @Rokt33r

I archived to create shortcuts for strings, but I can't put <a></a>.

I wrote these lines of code which are meant to put in the MarkdownPreviewer an <a></a> which points to the given url.

  const shortcodeTransformer = () => {
    return (tree: any, file: any) => {
      visit(tree, 'shortcode', function(node) {
        let attrs = node.attributes;

        node.type = 'a';
        node.href = 'https://boostnote.io';
        node.children = [{type: 'text', value: 'https://boostnote.io'}];
      });
    }
  };

Unfortunately it shows only a block with the string 'https://boostnote.io' as a children...

Can someone explain me how does render work?

@Flexo013
Copy link
Contributor

Flexo013 commented Nov 8, 2020

@themagiulio Please join our Slack and DM Rokt33r directly. He'll be able to help you out.

@issuehunt-oss
Copy link

issuehunt-oss bot commented Dec 12, 2020

@ritikchhipa5 has funded $2.00 to this issue.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
funded on issuehunt 💵 Issue has received funding that will be rewarded to the contributor solving this issue. improvement request 🔨 Issue concerns an existing feature that needs improvement.
Projects
None yet
Development

No branches or pull requests

5 participants