How to copy a PROMPT from ChatGPT with formatting preserved after a response is generated?
When I have a really good prompt in ChatGPT that did what I wanted it to do. In particular, when it was something data-wrangling related. For example, when I supplied the prompt with JSON or HTML, or some leading spaces, and new lines.
By default, after ChatGPT generates the response, and you try to copy-paste the prompt to a text editor, it'll be pasted as one long line of text. For example, the prompt from this chat session:

gets pasted to Notepad as:

To preserve formatting from the prompt, you can open Developer Tools in your browser (F12 shortcut on my machine, or Right Click, and select “Inspect”), focus on the prompt HTML element, and either double click on it, or Right Click + “Edit as HTML”, then copy text, and paste it in your text editor of choice:

Now your prompt is going to be pasted as:

Hope this helps. Please let me know in the comments if you have any questions.