Add TikTok embedding support
- User
Add TikTok embedding support
Assistant
Based on the provided files, there's no direct mention of TikTok embedding support. However, the following information can be inferred:
- Web Embeds Support: Excalidraw has introduced Web-Embeds (iframe element) in version 0.16.0, allowing embedding of content from other websites.
- Embeddable URL Validation: A
validateEmbeddableprop was added to customize embeddable src URL validation. This suggests that the embedding feature is flexible and can be extended to support various websites. - Supported Domains: There is a mention of supporting
giphy.comandD&D diceapp domains as embeddable content. - No Specific TikTok Support: There's no specific code or configuration that mentions TikTok or its embedding URLs.
How to add TikTok embedding support:
To add TikTok embedding support, you would need to:
- Update
validateEmbeddableProp: ThevalidateEmbeddableprop should be updated to include TikTok's embed URL patterns. For example, TikTok embed URLs usually look likehttps://www.tiktok.com/embed/VIDEO_ID. - Test the Embedding: Ensure that the TikTok videos are rendered correctly within the Excalidraw canvas.
- Submit a PR: Submit a Pull Request with changes to
validateEmbeddableprop and tests.
Code Example (Conceptual):
While I cannot provide the exact code, here's a conceptual example of how to update
validateEmbeddableprop:typescript// Inside the Excalidraw component setup const validateEmbeddable = (url: string) => { // Existing validations if (url.startsWith("https://giphy.com/embed/")) { return true; } if (url.startsWith("https://dnddice.com/embed/")) { return true; } // Add TikTok validation if (url.startsWith("https://www.tiktok.com/embed/")) { return true; } return false; }; <Excalidraw validateEmbeddable={validateEmbeddable} ... />Additional Notes:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.