reflex
reflex copied to clipboard
Allow Script Tags
Sometimes the user may need to provide JS scripts (for example, adding a Google Analytics script to their site). We need a clean way to allow this.
Could I work on this? If so, could you tell me where to start?
@gringrape i guess add one more component ScriptTag to the codebase. Then we can render that component to the page. So the whole feature would be sth like this?:
script_tag = ScriptTag(url='....')
app = pc.App()
app.add_page(index, scripts=[script_tag])
What's @Alek99 idea
Is @gringrape still working on this? If no, i can help with that.
There's a discussion on discord about how we should implement the Script tag.
Is @gringrape still working on this? If no, i can help with that.
There's a discussion on discord about how we should implement the
Scripttag.
Thank you! I will check on discord :)
Just for reference, I have a self-hosted umami script waiting to be implemented
'<script async defer data-website-id="3c907df2-dc16" src="https://xx.vercel.app/umami.js"></script>'
Ideally there would be something like pc.script where you could either copy&paste the whole external or define embeds?
watching this to be implemented.
Can I pick this issue up ?
@wassafshahzad Yes definitely! If you need help/guidance you can post on our Discord for faster replies.
Sure