Welcome to Portkey Forum

Updated 7 months ago

Preserving Indentation When Copying and Pasting Text into the Playground

πŸ› Copy pasting text in to the playground looses original indentation. Sharing more context in the thread:
b
V
R
10 comments
Example snippet:
Plain Text
company:
  name: Acme Corporation
  location: 
    city: Gotham
    country: USA
  departments:
    - name: Engineering
      head: John Doe
      employees:
        - name: Alice Johnson
          age: 28
          position: Software Engineer
        - name: Bob Smith
          age: 32
          position: Hardware Engineer
what gets pasted in the playground
Attachment
Screenshot_2024-04-24_at_1.32.36_PM.png
copy of the pasted content:
Plain Text
company:

 name: Acme Corporation

location:

city: Gotham

country: USA

departments:

 - name: Engineering

head: John Doe

employees:

 - name: Alice Johnson

age: 28

position: Software Engineer

 - name: Bob Smith

age: 32

position: Hardware Engineer
@bhuvansingla we are aware of this issue that for certain resources if the text is copied from, the indentation gets broken once its pasted. Will update here as soon as we've pushed the fix for same.
Thanks Roydev! Any chance you know of any hack I could use in the meanwhile?
Do not believe there is any except if you paste it to word/notes or somewhere similar and then paste it to Portkey Editor it should work just fine.

Let me know if that works till we provides a complete solution to this issue.
Ahh that's helpful. So copy from VSCode doesn't work, but from Notes does work. Thanks a lot! πŸ™Œ
I also noticed copying back from Portkey to a text editor adds an extra new line after every line πŸ›
This is a known issue! Cc @Sabbyasachi
Add a reply
Sign up and join the conversation on Discord