Quick way to type code in the Community's WYSIWYG editor

Last updated by Steve Clay Comments (2)

Until we can outfit the Community site with a better editor, here's how I put preformatted text in without going crazy.

  1. Hit Enter twice to make two empty paragraphs.
  2. Type the code into the first empty paragragh. (The second just makes it easier to put content after)
  3. Use Shift+Enter for newlines. This is important; you want this all in one P element.
  4. Use spaces instead of tabs.
  5. Click "Remove editor".
  6. Find the P element containing your code and change both the opening and closing P tags to PRE tags.
  7. Click "Add editor" to return to the WYSIWYG and finish your post.

Notes:

  • The HTML will have BR elements and nbsp entities. Not ideal but this is not worth worrying about.
  • For inline code, I just bold it. $foo = 'bar'; It's quick and fairly readable.
  • Until we can outfit the Community site with a better editor, here's how I put preformatted text in without going crazy. Until we can outfit the Community site with a better editor, here's how I put preformatted text in without going crazy. 

    Until we can outfit the Community site with a better editor, here's how I put preformatted text in without going crazy

    This is just testing linebreak (ENTER).

Navigation