Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Site Bugs / Suggestions
  4. Inserted CodeSnipped from VS look different in Editor and Preview

Inserted CodeSnipped from VS look different in Editor and Preview

Scheduled Pinned Locked Moved Site Bugs / Suggestions
visual-studio
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GerVenson
    wrote on last edited by
    #1

    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

    S OriginalGriffO C 3 Replies Last reply
    0
    • G GerVenson

      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

      S Offline
      S Offline
      Sean Ewington
      wrote on last edited by
      #2

      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

      G 1 Reply Last reply
      0
      • S Sean Ewington

        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

        G Offline
        G Offline
        GerVenson
        wrote on last edited by
        #3

        Thank you, but i think in future it would be nice when WYSIWYG within the editor.

        1 Reply Last reply
        0
        • G GerVenson

          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

          OriginalGriffO Offline
          OriginalGriffO Offline
          OriginalGriff
          wrote on last edited by
          #4

          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...

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

          1 Reply Last reply
          0
          • G GerVenson

            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

            C Offline
            C Offline
            Chris Maunder
            wrote on last edited by
            #5

            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

            G 1 Reply Last reply
            0
            • C 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

              G Offline
              G Offline
              GerVenson
              wrote on last edited by
              #6

              That is a good point im actually using the PowerTools from MS. That will cause this error, but its still confusing that the Editor shows a Makeup that will not be the expected outcome.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups