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

Custom script injection. #102

Open
Almas-Ali opened this issue Dec 17, 2023 · 2 comments
Open

Custom script injection. #102

Almas-Ali opened this issue Dec 17, 2023 · 2 comments

Comments

@Almas-Ali
Copy link
Contributor

Almas-Ali commented Dec 17, 2023

External script tags like Google Analytics, Adsense etc other tags require to inject on html page. How can we handle this? Currently we don't have any way to handle this thing.

In my opinion, we can create some additional components to handle each specific tags. Let me know @samuelcolvin, if anything else we can perform for this task.

@shroominic
Copy link

You can override the prebuilt_html method and add your custom html

@samuelcolvin
Copy link
Member

Overlaps with #19 (comment).

I think we should add:

  • support for adding more scripts in the prebuilt_html method as suggested by @shroominic
  • a RawHtml component that let's you both render some raw HTML and execute arbitrary JS, e.g. you could call a method exported by the scripts you loaded via prebuilt_html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants