Turning the demo into an IDE experience#122
Conversation
|
Hi @jonbgallant, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
TTYL, MSBOT; |
ali-hamud
left a comment
There was a problem hiding this comment.
Hi Jon,
A really appreciate your well to help here.
actually we wanted to do that, to enable users to write there own code, and this makes sense.
There is one problem:
In your changes you use eval function, which isn't safe.
we didn't want to use it.
we are looking into another solution which copies the user to an iframe, and then the code will be part of sandboxed iframe.
I removed the readonly attribute from the txtCode textarea so users can edit the code. I also store each code sample and any modifications the user makes to it, in session so their changes remain even after they navigate to another code sample.