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
Solved! Go to Solution.
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:
We've added a 'code' button (along with [show preview]). Let me know what you think!
I intially attempted to comment back to Jeremy's comment requesting feedback on the recently added 'code' button to the editor - however, the comment button doesn't seem to be working in Safari or Chrome now. So, trying to enter this as an answer.
I am not sure this code block feature is working as intended across browsers.
I do see that we now have a live preview option, which has been helpful while forming this comment to demonstrate what I see happening here ;-)
For what it's worth, I started trying to enter this comment via Safari v5.1 - and the comment button does not seem to work in Safari. The cancel button does, but comment simply does nothing.
I am now typing this sentence before I click the 'code' button, and hitting return for a new line
Noticed also that the formatting drop down menu seems to be not there when typing in a comment
Now, I'll click code, and enter some pseudo code, and then attempt to enter some further descriptive text after the code block.
{replace-and-render} {replace-item:%thingee%}value{replace-item} {replace-body} The Value of Thingee is: %thingee% {replace-and-render}
Now I can't get OUT of code mode...how do I make it stop entering text as code.
Is this because the format dropdown menu is gone?
I am seeing that if I select and try making this line bold, it looks bold in the edit window, but gets 'strong' tags around it in the preview window
Same thing for italics - it looks italics in the edit window, but in the preview window puts 'em' tags
This one should be a blockquote...but...in the preview window it becomes another code line of it's own, indented. It's just an indented line in the edit window.
The only way I can find to get out of code block mode, is to select some text, and try making it to a list item and then tell it to not be a list item, then I seem to be back to normal text entry. This is far from intuitive.
Also, what about line wrapping for long lines?
When typing long lines, such as this one, which one would expect to linewrap when it reaches the right edge of the edit window, the window is instead expanding forever to the right (in Safari) or simply scrolling off to the left (in Chrome) as the line gets longer. I'm continuing to type farther and farther to the right, and this line just gets longer and longer and longer, making it more difficult to refer back to a concept a little bit earlier in the current paragraph. Line wrapping sure would be helpful here since I may not ALWAYS want a new paragraph when I hit the return key, which is currently the behaviour of hitting return. This line is now about 4 or 5 text areas wide
Edit:
noticed that preview is not available if editting an existing post (ie: this one)
in chrome, I was able to 'convert' my 'answer' to 'comment' - but was then unable to edit the comment to add a note regarding this. Cannot seem to edit comments at all as the comment button simply doesn't work. Am now attempting to add a new comment to this thread from Firefox 6.0.2 -- since adding comments via Safari and Chrome have been failing so far today for me.
Now I can't get OUT of code mode...how
do
I
make
it stop entering text as code.
Thanks Jim and Laura. These are good suggestions. I've raised four different bug reports:
That fourth one's mine I added, but it seemed obvious!
Jeremy, thanks for opening up issues to followup on these behaviours.
Ticket: Code Block should wrap for long lines
Ticket: Question Marks appearing
EDIT: Oddly enough, I was just able to add this comment via Safari - and now adding this edit to it after the fact
EDIT: clarification of the long lines statement above.
Still having problems with trying to put code into comments here on answers...
This one got really messy as urls inside the block of text intended to be treated as code got expanded into HTML
https://answers.atlassian.com/questions/20348/atlassian-cli
This is truly making the use of answers.atlassian.com a whole lot more difficult than the old forums site which used the same type of syntax we are used to using within Confluence itself.
Thanks for pointing it out Jim. I'd like to get this right. I raised a couple bugs/improvements:
We'll investigate both.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.