cancel
Showing results for 
Search instead for 
Did you mean: 
rh123
Mission Specialist
Mission Specialist
  • 3,050 Views

openshift console paste

Jump to solution

is any posibilitest to paste without format to yaml editor window in OpenShift web console.

each new line start not on beggining but with some spaces as continutaion of yaml block

it's very annoning, when you are going to paste yaml file

Labels (1)
1 Solution

Accepted Solutions
Travis
Moderator
Moderator
  • 2,962 Views

@rh123 -

Not 100% sure what you are attempting to ask as part of this question, but let's break things down a little ...

OCP YAML in-browser EditorOCP YAML in-browser Editor

The OpenShift webUI does allow you to copy/paste and edit the YAML files for whatever OCP resource that you're attempting to modify. The editor works much like VSCode or Atom in how the formatting and the view works so it shows the nice horizontal alignment using the vertical column guides for spacing.

The editor and copy/paste functionality also allows you to paste in formatted YAML content and observes the same spacing. 

So if you have a properly formatted YAML file, it is possible to copy and paste from your favorite editor directly into OCP and it will retain the original formatting, so if lines are indented, it will still have the indentation.

If you are pasting unformatted text, the text will paste in as a mess and like a plain text file, so unless you hit enter and have line breaks, you will not see any line wrapping and it will continue to go out horizontally. Additionally, new lines in OCP will not be automatically formatted or indented either.

Hope this helps,

Travis

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training

View solution in original post

3 Replies
Travis
Moderator
Moderator
  • 2,963 Views

@rh123 -

Not 100% sure what you are attempting to ask as part of this question, but let's break things down a little ...

OCP YAML in-browser EditorOCP YAML in-browser Editor

The OpenShift webUI does allow you to copy/paste and edit the YAML files for whatever OCP resource that you're attempting to modify. The editor works much like VSCode or Atom in how the formatting and the view works so it shows the nice horizontal alignment using the vertical column guides for spacing.

The editor and copy/paste functionality also allows you to paste in formatted YAML content and observes the same spacing. 

So if you have a properly formatted YAML file, it is possible to copy and paste from your favorite editor directly into OCP and it will retain the original formatting, so if lines are indented, it will still have the indentation.

If you are pasting unformatted text, the text will paste in as a mess and like a plain text file, so unless you hit enter and have line breaks, you will not see any line wrapping and it will continue to go out horizontally. Additionally, new lines in OCP will not be automatically formatted or indented either.

Hope this helps,

Travis

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
rh123
Mission Specialist
Mission Specialist
  • 2,928 Views

Sorry for late response, it looks I was facing with the issue on RHLS env, when I had on my workstation yaml, and when I tried to paste it on remote  env, the yaml was malforemd, additional tabs were added, when I tried to paste to gedit, it looked well. On CRC i didn't have such issues, but CRC I had on my workstation, not sure what is root couse of this issue.

Travis
Moderator
Moderator
  • 2,925 Views

@rh123 -

If you're referring to copy/paste within the ROL/RHLS environment depending on the course and how you are attempting to do copy/paste, that can be a very large "known" issue. Because of delays in the network connection, the VNC client, and other things as well as formatting from the book, sometimes copy/paste from the PDF or your local system through that interface will corrupt spacing, capitalization, and even introduce additional characters or drop characters. 

If you have an environment where you can access the content within the virtual machine, the copy/paste should work much better and be more reliable. This is one of the problems being investigated and has been part of discussions with the platform and curriculum teams on how to best address and fix the issues.

Tagging some other team members for visibility on this issue.

@patsharp @Geoff @joelbirchler 

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
0 Kudos
Join the discussion
You must log in to join this conversation.