hackIDE icon indicating copy to clipboard operation
hackIDE copied to clipboard

Feature to save code written in a language while switching to another language

Open StealthX2k20 opened this issue 4 years ago • 6 comments

User's code on one language gets erased on switching to another language. I'm willing to take this up.

StealthX2k20 avatar Aug 24 '21 05:08 StealthX2k20

Thanks for creating this issue. Sure, feel free to take this on. It would be nice to discuss what you have in mind before you create a Pull Request.

sahildua2305 avatar Aug 24 '21 23:08 sahildua2305

Sure, the approach is pretty basic, here's what I think :

  1. We can save a key-value pair in local-storage where key corresponds to the chosen language and value corresponds to the currently written code.
  2. Every time when the user tries to switch the language we can render the code if its present in the local-storage otherwise we can render the default boiler plate of that language.

StealthX2k20 avatar Aug 25 '21 05:08 StealthX2k20

Hi @sahildua2305 , Please review my PR for the mentioned issue. Let me know if any changes are required. :) Thanks.

StealthX2k20 avatar Aug 27 '21 18:08 StealthX2k20

Hi, Is this still open? I want contribute

ivandev-81 avatar Apr 06 '22 09:04 ivandev-81