Skip to content

Download file should have different .extension based on what language is selected #150

Description

@Adnan-shamsi

In code-editor when user wants to download editors code using the download button in the navbar , the file currently downloaded as .txt , but if user wrote a python code or you can say if user has selected python language then the downloaded file should have extension as .py

it can be done by having a global state for the selected language and based on that language you have to provide user an option to either download it as a .txt or as the .<Selected Language extension name>
Here we want to give user choice between a .txt and .<Selected Language extension name> since .py or .js file when downloaded gives warning to user that it can damage the pc so some people can cancel because of the security reason

You can provide choice in a modal as Do you want to download as a .txt or as a <Selected Language extension name>` <Yes> or <No>
based on choice download it by running the current download function

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions