I use reactivity to create an application that will allow the end user to enter their own html / css, and I wanted to isolate their code from the main application using an iframe (yes, I know that saving markup in the database is bad, but it is required in this case ), so the user will enter their markup in the field, and then I wanted this data to be extracted into the iframe via the server, but I noticed that the reaction does not work very well with iframes in this way dangerouslySetInnerHTMLbut without luck and consent with caniuse it srcDocdoesnβt work either in one version of IE / edge. also the method described here: https://developer.zendesk.com/blog/rendering-to-iframes-in-react, but it seems extremely confusing and fragile.
Is there a way to add markup in an iframe using a reaction?
source
share