[RFC] Overriding the html template
See original GitHub issueHow do you envision this feature/change to look/work like?
Users would like to override the index.html
template wrapper used to contain the popup/options/etc scaffolds.
There are two potential way to implement this feature:
- We have a
popup/index.tsx
AND apopup/_document.tx
file that implements the override of the index.html - We exposes special component tags that get transformed (or rather, mounted) into the proper area of the original index.html -> this would be similar to the <Head> tag of Nextjs where it automatically mount the data inside into the Head
What is the purpose of this change/feature? Why?
Allow customization for style injection and other capabilities that can be done more easily if the template can be modified.
(OPTIONAL) Example implementations
- https://nextjs.org/docs/advanced-features/custom-document
- https://nextjs.org/docs/api-reference/next/head
(OPTIONAL) Contact Details
No response
Verify canary release
- I verified that the issue exists in
plasmo
canary release
Code of Conduct
- I agree to follow this project’s Code of Conduct
- I checked the current issues for duplicate problems.
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:6 (4 by maintainers)
Top Results From Across the Web
HTML Format for RFCs RFC 7992 - IETF Datatracker
This document defines the HTML format that will be rendered for an RFC or ... as additional. o The HTML document will allow...
Read more >Guidelines for Writing RFC Text on Security Considerations
Abstract All RFCs are required to have a Security Considerations section. ... This allows administrators to set top level policies and override them...
Read more >SAP ChaRM - URL to Create RFC Based on Template
You need to override the CRM-OBJECT-TYPE for rfc template. Complete guide here:- (Maintain the UI object type which is mentioned there). http:// ...
Read more >Class-based views - Django documentation
Consider, for example, a view that just displays one template, about.html . ... this - TemplateView - so we can subclass it, and...
Read more >FOSUserBundle template override not working with Symfony ...
I can't override default FOSUserBundle templates. I tried to do everything following the Symfony documentation, tutorials and nothing works.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The
_document.tsx
feature is not implemented yet - it’s only at the RFC/drafting stage atm! 😅In terms of the example for injecting style, something like this might work:
style.css
popup.tsx
OR
popup.tsx
You might also need to add the remote font URLs to the manifest CSP policy: https://developer.chrome.com/docs/extensions/mv3/intro/mv3-migration/#content-security-policy
To add to manifest in Plasmo: https://docs.plasmo.com/customization#overriding-the-manifest
Additional uses cases include: