BoostNote-App icon indicating copy to clipboard operation
BoostNote-App copied to clipboard

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

Open shashank-k opened this issue 5 years ago • 9 comments

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

shashank-k avatar Dec 21 '19 12:12 shashank-k

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

Flexo013 avatar Dec 21 '19 15:12 Flexo013

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. https://github.com/remarkjs/ideas/issues/9 Although gist doesn't support oembed.

Rokt33r avatar Jan 09 '20 00:01 Rokt33r

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

Rokt33r avatar Jan 09 '20 23:01 Rokt33r

An anonymous user has funded $5.00 to this issue.


issuehunt-oss[bot] avatar Jun 12 '20 08:06 issuehunt-oss[bot]

You contact me I will try

Erprincekumarojha avatar Jun 18 '20 05:06 Erprincekumarojha

@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!

Flexo013 avatar Jun 27 '20 12:06 Flexo013

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?

themagiulio avatar Nov 06 '20 16:11 themagiulio

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

Flexo013 avatar Nov 08 '20 17:11 Flexo013

@ritikchhipa5 has funded $2.00 to this issue.


issuehunt-oss[bot] avatar Dec 12 '20 12:12 issuehunt-oss[bot]