none
No text allowed after Code Block is inserted RRS feed

  • Question

  • After the recent forum updates, I find when I insert a code block, then attempt to add more content after the code, everything I add is now in a code block. For example, text no long word wraps as I enter it (although I believe it wraps after I submit), and the text appears enclosed in boxes to me. If I press enter to get space between paragraphs, I get more boxes. If I later insert another code block, it seems to be embedded in the first.

     


    Richard Mueller - MVP Directory Services
    Tuesday, May 17, 2011 5:40 PM
    Moderator

Answers

All replies

  • Has no one else noticed that once you insert a code block, you really can add no futher content to your reply? I'm having a terrible time formating my replies.

     


    Richard Mueller - MVP Directory Services
    Wednesday, May 18, 2011 10:26 PM
    Moderator
  • I answered a thread about this a week ago or so. It's a bug, we'll try to fix it soon. Thanks
    Community Forums Program Manager
    Thursday, May 19, 2011 5:31 AM
    Answerer
  • Has no one else noticed that once you insert a code block, you really can add no futher content to your reply?


    This is a good example of how necessary having an HTML mode is.  Be grateful that you have one.  In Answers we have to try to find blind workarounds using using various edit steps involving temporary inserts, partial deletes and undos (Ctrl-z), etc.  It is an unnecessary pain.  In fact, getting rid of your HR without resorting to HTML mode was a pain too.  I keep forgetting to insert first and then delete.  That might make it more predictable.

    FYI

    Robert
    ---

    Thursday, May 19, 2011 3:55 PM
  • I've never used the "Edit HTML Source" feature before, but I see what you mean. I think I would be one of the few people in the forums I work in that could use this. I had to learn some HTML to manage my web site when FrontPage died. However, the <pre> tag (preformatting) was new to me. After research I see it is supposed to maintain white space, which does not happen (indenting always gets squashed, although carriage returns are retained) and also use a fixed width font, which also does not seem to be the case. When you paste code in a reply, the difference between the characters ' " ` ( { is important, but are very difficult to read. I'm debating writing a script to convert a script text file into HTML, perhaps specifying Courier New, and ensuring indenting is maintained. But I have to figure out how to restore the font at the end in case I want to add more text after the code block (I don't know what font is used). Maybe I can also figure out how make sure blank lines are retained before and after a code block. They seem to keep disappearing, making the reply difficult to read.

     


    Richard Mueller - MVP Directory Services
    Friday, May 20, 2011 5:06 PM
    Moderator
  • However, the <pre> tag (preformatting) was new to me. After research I see it is supposed to maintain white space, which does not happen (indenting always gets squashed, although carriage returns are retained) and also use a fixed width font, which also does not seem to be the case. When you paste code in a reply, the difference between the characters ' " ` ( { is important, but are very difficult to read.


    Ooh.   You had to pick that one.   I don't think <pre> works properly in these forums.   I think it may be Ok for single line formatted inserts but I never had any luck with it, though that was a while ago, playing in the Sandbox...

    http://social.microsoft.com/Forums/en-US/comsandbox/thread/47ec31a2-5e67-47ec-b738-d0f0d64d8f9f#7a00a6a8-964c-444b-b60a-d3f25a92e24b

    Faulty recollection?  It was Answers 1.0 which had that problem.  (Now that they have removed the HTML button from Answers 2.0 there are no more bugs in it in this regard. Ha!)   But there appears to be (have been) a problem with samp in both.

     

    FWIW

    Robert
    ---

    Friday, May 20, 2011 10:49 PM
  • I managed to get what I want using the "Edit HTML Source" feature. I wrote a script that reads code from a text file and converts it into HTML, preserving the spacing and formatting, and using Courier New. I experimented in the TechNet Sandbox forum here:

    http://social.technet.microsoft.com/Forums/en-US/tnsandbox/thread/04190e1d-ff10-4c77-a47a-778c1beb75cc

    For me this isn't bad, as I can use my script. My script converts the characters I know to be possible problems, like &, ", ', and >.  The HTML looks terrible when I paste it in the HTML editor, as my carriage returns are lost, but it renders exactly as intended. It remains to be seen how this works if someone quotes my code. The basic problem is that the <pre> tag does not work as documented. This is demonstrated in my sandbox thread, where things that should line up do not come close.

    Thanks for leading me in this direction.

     


    Richard Mueller - MVP Directory Services
    Saturday, May 21, 2011 1:18 AM
    Moderator
  • This should be addressed in our June 9th release, assuming we don't cause other issues with our fix.
    Community Forums Program Manager
    Wednesday, May 25, 2011 8:30 PM
    Answerer