Answered by:
How to return to Plain Text in a Post After Using Code Formatting Tool

Question
-
This is probably something incredibly simple, but it totally escapes me.
When I reply to a forum post and use the code formatting tool to put sample code in the post, text I attempt to add after the code block always appears in a new outline block (like another code block). Each time I hit Enter to start a new paragraph, a new block outline appears.
Like this (ignore code, it's here for illustration only):
#include <iostream> #include <string> #include <sstream> using namespace std; int main() { string input = ""; // How to get a number. int myNumber = 0; while (true) { cout << "Please enter a valid number: "; getline(cin, input); // This code converts from string to number safely. stringstream myStream(input); string zz = myStream.str(); //int zzz = myStream; cout << zz << " " << myStream << endl; if (myStream >> myNumber) break; cout << "Invalid number, please try again" << endl; } cout << "You entered: " << myNumber << endl << endl; char cont; cout << "Hit Enter to quit." << endl; cont = cin.get(); }
Now I want to go back to text input, but what I type is in a block outline.
And again!
How to escape?
Now, when I edit, I'm back in text mode, and I realize it *looks* OK when posted. But, when trying to type text after a code block, the line wrap no longer works and I have to hit enter to go to a new line.
- Edited by pvdg42 Wednesday, May 11, 2011 12:42 AM typo
Answers
-
here is an exampleYou are right, you can't easily do this...I have logged a bug. To work around this, after inserting the code you can go into html mode (the html toolbar in the editor) and type after the </pre> element. Sorry about this, it is annoying for sure.
#include <iostream> #include <string> #include <sstream> using namespace std; int main() {
Community Forums Program Manager- Proposed as answer by Brent SerbusEditor Wednesday, May 11, 2011 4:45 PM
- Marked as answer by pvdg42 Wednesday, May 11, 2011 6:31 PM
All replies
-
You should use the Community NNTP bridge to avoid such problems ;)
http://communitybridge.codeplex.com/
Jochen Kalmbach (MVP VC++) -
here is an exampleYou are right, you can't easily do this...I have logged a bug. To work around this, after inserting the code you can go into html mode (the html toolbar in the editor) and type after the </pre> element. Sorry about this, it is annoying for sure.
#include <iostream> #include <string> #include <sstream> using namespace std; int main() {
Community Forums Program Manager- Proposed as answer by Brent SerbusEditor Wednesday, May 11, 2011 4:45 PM
- Marked as answer by pvdg42 Wednesday, May 11, 2011 6:31 PM
-
-