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. Article Writing
  4. Formating code

Formating code

Scheduled Pinned Locked Moved Article Writing
helpquestion
4 Posts 3 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.
  • P Offline
    P Offline
    Pat Capozzi
    wrote on last edited by
    #1

    I am missing something. How do we insert a code block in an article? I understand that we need the pre block but do we need to go through the code and remove all the special characters like the '>'? Thanks for any help.

    P 1 Reply Last reply
    0
    • P Pat Capozzi

      I am missing something. How do we insert a code block in an article? I understand that we need the pre block but do we need to go through the code and remove all the special characters like the '>'? Thanks for any help.

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Encode your characters so that they are valid HTML. A decent web editor will help you here.

      Forgive your enemies - it messes with their heads

      My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

      P 1 Reply Last reply
      0
      • P Pete OHanlon

        Encode your characters so that they are valid HTML. A decent web editor will help you here.

        Forgive your enemies - it messes with their heads

        My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

        P Offline
        P Offline
        Pat Capozzi
        wrote on last edited by
        #3

        I have tried entering valid html inside the pre block and nothing shows up.

        L 1 Reply Last reply
        0
        • P Pat Capozzi

          I have tried entering valid html inside the pre block and nothing shows up.

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          Last time I used it, the on-line article editor had two modes (WYSIWYG and HTML), switchable through a <> widget. I suggest you paste your HTML-encoded code (which means &lt; for < and similar for > and &) inside PRE tags while the editor is in HTML mode. What I normally do is edit the article off-line, then paste it all in one go in the empty editor, again in HTML mode. :)

          Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum

          Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

          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