I've seen this come up a bunch. I managed to accidentally copy a code block in from a forums post, but that doesn't seem the right solution.
Update: The Wysiwyg editor now has a preformatted option in the dropdown menu
I've had the same problem. I can copy and paste a code block
this is a code block<br>
But, I can't seem to use markdown or anything else (at least as of June 3, 2011) to format it in the RTE. I've tried backticks, wiki-like markup (just in case ), and looked in sites like:
So, for now, copying and pasting hopefully works. This looks like it would be a good addition to answers though and works with OSQA that answers is built upon: http://meta.osqa.net/questions/3834/markdown-with-syntax-highlighter but we can't use that unless it is installed. I'm probably wrong about all of this though and assume this will be fixed or clarified later.
Edit: Read Jeremy's answer.
It's logged as ANSWERS-57. For starters, we're adding a 'preformatted' style option, as a start. Even better would be a top-level code button, so ANSWERS-57 will stay open until that's ready.
UPDATE: We just rolled out an update with a 'Style' menu containing 'Preformatted'. It's a first step towards a code macro.
I agree with Matt Dour's comment on ANSWERS-57
"I don't think the preformatted option for the style does a very good job..."
Personally, I'd like to be able to use similar wiki edit syntax as I would when writing a post in Confluence. This was the behavior on forums.atlassian wasn't it?
Also, why is the text entry field so small. When composing a comment back to posting, being able to only see 4 or 5 lines is pretty limitting, especially if you are trying to convey how to do something with code syntax to someone which likely spans multiple lines at a time.
And what about a preview the post option? What happened to that?
Hi Jim, I agree. We're just now working up a better option for this, which should be posted by Monday (Sept 12). Look for a 'code' button on the far right of the edit bar. We'll also have preview with that.
As for the small size of the text box, that one we haven't changed yet. I've added it as a feature request:
Expand the size of the comment or answer box
We've added a 'code' button (along with [show preview]). Let me know what you think!
It looks like you're new here. Sign in or register to get started.