• Hi there, I’m trying to use Atlas to allow me to use tiktok embeds as a type to serve over graphql. I am trying to get the richtext type to work but it seems like it will be a bit janky. Plain text doesn’t work as all the HTML tags get stripped out. Any chance there will be / could be a “code” type added in the near future?

    Thanks!
    Jay

Viewing 1 replies (of 1 total)
  • Plugin Contributor Nick C

    (@modernnerd)

    Thanks for the suggestion, @jaypozo!

    The plain text field currently filters HTML output as you noted, but we could add an option to prevent filtering for folks who want to use plain text for HTML embed code.

    We’ve added this to our product backlog to take a look at in the future. I don’t have a timeline quite yet, but thank you very much for sharing your use-case here.

    As a workaround for now, you could use a plain text field with the HTML link to the TikTok (instead of the full HTML embed code). Then on the frontend you can use TikTok’s oembed API to grab the embed HTML. For example, a request to this URL will give you the embed HTML in the ‘html’ property of the response, as well as other properties that might be useful on the frontend like the thumbnail URL and size:

    https://www.tiktok.com/oembed?url=https://www.tiktok.com/@scout2015/video/6718335390845095173

    TikTok has docs on this here if you’d like to learn more: https://developers.tiktok.com/doc/embed-videos

    • This reply was modified 2 years, 9 months ago by Nick C.
    • This reply was modified 2 years, 9 months ago by Nick C.
Viewing 1 replies (of 1 total)
  • The topic ‘embed code’ is closed to new replies.