Loading CSS from a CDN not working · Issue #14 · html-preview/html-preview.github.io · GitHub
Skip to content

Loading CSS from a CDN not working #14

Open

Description

@mruijzendaal

Thanks for the great utility!

Unfortunately, I'm having trouble loading TailwindCSS from the CDN.

Example standalone plain HTML: https://github.com/bradtraversy/tailwind-course-projects/blob/main/mini-projects/email-subscribe/index.html
Example preview: https://html-preview.github.io/?url=https://github.com/bradtraversy/tailwind-course-projects/blob/main/mini-projects/email-subscribe/index.html

Any help would be greatly appreciated.

Thanks in advance,
Martin

Activity

  1. mruijzendaal commented on Aug 29, 2025

    @mruijzendaal
    Author

    This appears to be caused by the following section in htmlpreview.js:

    I'm sending a PR your way that only replaces the <script> elements that reference a known git forge, and leaves the rest intact. I am completely unfamiliar with the logic used in this script, and made the PR with the help of Copilot. I tested the result with my original issue and the examples (1, 2) from the README, and all are now working. Please check accordingly.

  2. mruijzendaal commented on Aug 29, 2025

    @mruijzendaal
    Author

    Thanks for keeping this more up to date than the original fork, and thanks in advance for merging.

  3. added theissue type on Sep 30, 2025
  4. linked a pull request that will close this issueFix #14 #15on Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions