Inserted CodeSnipped from VS look different in Editor and Preview
-
Hey, I inserted some code from VS into the new Article editor on CP and it looks great in editor but not in preview. Image
Unfortunately the editor can get cranky with that. If you go into the HTML mode you can strip out the bad stuff. Or if you just don't want to deal with the editor email me and I would be happy to on your behalf. I've fixed the formatting for you on this one.
Thanks, Sean Ewington CodeProject
-
Unfortunately the editor can get cranky with that. If you go into the HTML mode you can strip out the bad stuff. Or if you just don't want to deal with the editor email me and I would be happy to on your behalf. I've fixed the formatting for you on this one.
Thanks, Sean Ewington CodeProject
-
Hey, I inserted some code from VS into the new Article editor on CP and it looks great in editor but not in preview. Image
You don't have to go into HTML mode (which brings it's own problems from time to time). Have a look here: Using the Article Editor (without losing your hair in handfuls)[^] - it might help!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
-
Hey, I inserted some code from VS into the new Article editor on CP and it looks great in editor but not in preview. Image
Are you using an add-in or extension that copies the code as HTML? (PowerCommands or something?) This is the issue because the code is no longer pure code, it's actually marked-up code, so pasting into a PRE block makes the editor think you're pasting a HTML sample, not a C# or C++ or whatever sample. Simple solution is to use the "Paste as plain text" button. Top row of the article editor's toolbar, 4th icon along.
cheers Chris Maunder
-
Are you using an add-in or extension that copies the code as HTML? (PowerCommands or something?) This is the issue because the code is no longer pure code, it's actually marked-up code, so pasting into a PRE block makes the editor think you're pasting a HTML sample, not a C# or C++ or whatever sample. Simple solution is to use the "Paste as plain text" button. Top row of the article editor's toolbar, 4th icon along.
cheers Chris Maunder