Highlighted
Starfighter Starfighter
Starfighter
  • 343 Views

PSA: RHLC and adding playbook code to replies

Folks, I've noticed that it's awkward to correctly add Ansible Playbook code in replies. We have had some examples posted with weird indentation because of what RHLC does to it when it's entered in body text without markup (basically killing all leading whitespace).  @Deanna it looks like part of the reason for this is that the Rich Text editor is missing some of the formatting buttons for replies, particularly code (</>), so folks don't see a way to write this.  If we have that button, it pops a window that you can use to enter text that gets formatted, like this:

- name: This is an attempt in RHLC using code
  debug:
    msg: This is formatted in a readable way

For us, until/unless this gets fixed, there is a workaround.  You can switch temporarily to HTML mode and wrap your fixed-width text in <pre> </pre> tags.  Then you can switch to Preview to ensure it's being displayed as expected, or back to Rich Text to finish writing things up there.

Labels (2)
2 Replies
Highlighted
Starfighter Starfighter
Starfighter
  • 336 Views

Re: PSA: RHLC and adding playbook code to replies

Note that the Rich Text editor seems to have the missing buttons when you post a new discussion, just not when you reply to it.

Reply
Loading...
Highlighted
Moderator
Moderator
  • 129 Views

Re: PSA: RHLC and adding playbook code to replies

@bonnevil - 

Thanks for the tip/PSA. I will say I have seen the buttons when I initially create an article, but not always. I'm tagging @Deanna again to remind me for tomorrow.

 

 

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