Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Fallback to a card block for pasted URLs that don't return oEmbed data #12

Closed
claviska opened this issue Apr 22, 2017 · 2 comments
Closed

Comments

@claviska
Copy link
Member

claviska commented Apr 22, 2017

Currently, Postleaf looks for an oEmbed service when a URL gets pasted into the editor or the embed tool. If the site doesn't support oEmbed, the URLs just gets inserted as-is.

There probably aren't a lot of cases where a user pastes a URL into the editor and actually wants the URL to as-is. Using Discourse today, I noticed they produce a card block (onebox) for non-oEmbed URLs:

screen shot 2017-04-21 at 9 54 20 pm

This would be a great enhancement for Postleaf. As with oEmbed providers, the theme should be able to customize their appearance to match the surrounding content.

Possible candidates to replace the existing oEmbed lib:

@claviska claviska self-assigned this Apr 22, 2017
@claviska claviska added this to the 1.0.0-alpha.3 milestone Apr 30, 2017
@claviska
Copy link
Member Author

claviska commented May 8, 2017

Here's what they look like:

screen shot 2017-05-08 at 4 06 58 pm

Pasting or embedding a URL in the editor (or inserting a URL in quick post) will generate one of these previews under the following conditions:

  • The URL isn't an image (it will be inserted as an image if it is)
  • The URL doesn't support oEmbed

Note: card styles are 100% configurable in the theme.

@claviska
Copy link
Member Author

claviska commented May 8, 2017

If you want to try this in master, make sure to git pull the default theme to get the necessary styles.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

1 participant