Basic CMS: Allow users to add custom CSS
For an App I am building, the platform provides users with a unique subdomain, which they can customize the layout by adding Rows, which have various templates to choose from. I want to allow users to upload their own CSS / JS to customize the look of the page.
Right now I am allowing them to upload a file to the platform, and then I render the file in page if present. I am wondering if there is a better approach to this.
Thanks for your help.
Copy/paste into a text field which you can easily sanitise is probably a bit saver (for you and your users). Otherwise limiting users to change only certain aspects of the UI (colours, etc.) is often good enough. I've personally done almost full-custom layouts and the customer support for it was horrendous (“your pages are broken!”).