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 Youtube, IG, TW and FB #206

Closed
literakl opened this issue Aug 10, 2021 · 1 comment
Closed

Embed Youtube, IG, TW and FB #206

literakl opened this issue Aug 10, 2021 · 1 comment
Assignees
Labels
feature: Editor WYSIWYG editor priority: P1 must be fixed first type: enhancement New feature or request type: UX user experience improvement
Milestone

Comments

@literakl
Copy link
Owner

literakl commented Aug 10, 2021

The task is to enhance TipTap editor with new plugin (extension) to insert a link with preview. A user clicks the embed button within the editor and pastes the URL from the supported providers (Facebook, Twitter, Youtube, Instagram). If URL is unknown, the plugin will render the URL as a normal link in a DIV. The preview HTML will either use provider's JS to display the preview or use some 3rd party library. The link preview must be visible either in WYSIWYG editor when creating / editing the post and in the post view itself. The result must be mobile friendly and responsive.

The implementation shall download all data in the client's browser. The backend must not download from the URL. I prefer that backend stores only the URL / provider type and all fetching / rendering will be done in a client. This is safe from intellectual properties point of view and there is no risk of blocking the server (deny TCPIP list, too much requests).

Some helpful links:

Some libraries with similar purpose. I do not know if they can be probably reused, but they me inspire you:

Providers API:

@literakl literakl added type: enhancement New feature or request type: UX user experience improvement priority: P1 must be fixed first labels Aug 10, 2021
@literakl literakl added this to the Go live milestone Aug 10, 2021
@literakl
Copy link
Owner Author

literakl commented Sep 5, 2021

Errors found in console during testing:

Embedding Twitter URL ends up with a paragraph containing the URL and there is an error. See undefined in URL.

Uncaught TypeError: invalid json response body at http://localhost:8080/p/1feofh53uk/b/final-test/undefined/twitter-html?url=https://twitter.com/pelikanekcz/status/1434445742211469313 reason: Unexpected token < in JSON at position 0
at Response.json (browser.js:146)
at Iframe.getOEmbed (Iframe.js:185)

This error happen when you embed IG URL (in editor, without saving), for example https://www.youtube.com/watch?v=-VSS366Vhhk

www.instagram.com/static/bundles/es6/EmbedSimple.js/58fc7131a5e5.js:129 ErrorUtils caught an error:
Non-object thrown: undefined
Subsequent non-fatal errors won't be logged; see https://fburl.com/debugjs.

@literakl literakl added the feature: Editor WYSIWYG editor label Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: Editor WYSIWYG editor priority: P1 must be fixed first type: enhancement New feature or request type: UX user experience improvement
Projects
None yet
Development

No branches or pull requests

2 participants