C/C++ code formatting in IE RRS feed

  • General discussion

  • Users that tried to post C/C++ code never had much luck at these forums.  The memory of the killer smileys is still fresh.  The new post editor does a horrid job of it in IE, posts like this one are common since the upgrade.  It looks to me like it tries to interpret the rich text on the clipboard.  What comes out is mangled beyond recognition with arbitrary line breaks and spacing and mixed font sizes.

    I understand that Insert Code Block was meant to prevent this, newbies however rarely discover it.  I'm sure you've got a big backlog (adding C/C++ as a formatting option for one) but please consider some work on keeping it reasonably intact.  Disabling the RTF interpreter (if there) probably helps.
    Hans Passant.
    Sunday, March 29, 2009 1:31 PM

All replies

  • Here's an example of Visual Basic code getting the same treatment.
    Hans Passant.
    Sunday, March 29, 2009 1:40 PM
  • Yes, we have many todo's for code blocks. C/C++ should be on the way. I explained a little in another post, with this version we don't store the formatted code, just <pre lang="xx"> so we'll have a lot more flexibility going forward to fix/tweak things.

    Unfortunately, that doesn't help with the scenario you describe. TinyMCE has a lot of extensibility so we'll have to look at ways for clipboard pasted code that we could detect and handle in a reasonable way.
    Rob J, Forums Dev
    Sunday, March 29, 2009 4:36 PM
  • It doesn't.  This thread is another screaming example.
    Hans Passant.
    Tuesday, March 31, 2009 2:21 PM