Code To HTML

  • Author
  • #4450


    Hello, I’m new to and blogging altogether. I was wondering if there is some eaasy way to post source code such as C++, lisp, etc. I put together a source code to HTML converter and that is working ok for now but there is a problem with it. Once I post the HTML code into the wordpress editor everything is fine, but once I go to edit my post all the HTML disappears.

    I would like to suggest that the team install the Code Markup plugin which would make my blogging a lot smoother. For now, if anyone is interested in the code to html converter you can grab it from here:

    And here is the link for the code markup plugin:
    Thank for your time.



    Which editor are you using? I normally suggest using the text editor over the fancy one as you’ll have better control over your post.

    Usually for code display, you have to encode it with an encoder like this one.

    Hope this helps,


    There are really 2 issues here:

    1) If you’re trying to put HTML examples (or other code that uses angle brackets) into your posts, you have to make sure that you use HTML character encoding, like & l t ; (but no spaces) for a less than bracket.

    2) In order for this to work, you have to turn off the use rich editor option, otherwise wordpress thinks that your brackets are html entities and strips them.

    If you’re coding HTML, a great shortcut is to download a copy of Nvu, it’s a free, open-source, and otherwise cool wsyiwyg xhtml editor.

    You can type the HTML directly into Nvu, then copy and paste from the source into the post editor, which saves a lot of time.



    Yes, > and < are variously affected by the rich editor. You would do well to use the plain editor for any complex posting.

    Also, style tags are removed. If you want colored code you must use font tags.



    Is there a way to turn off the rich text editor with a free hosted wordpress account?



    Ok, so I figured out how to disable the WYSIWYG editor (uncheck the option “Use the visual rich editor when writing” at the bottom of the profile page a.k.a. Users > Your Profile, kind of a weird place for it if you ask me).

    Now the problem is line break, how do i get it to not convert line breaks?



    I just use <br /><br /> myself or just leave blank lines. Seems to work for me. :)



    Oh ye of little faith.

    The plain editor automatically runs one carriage return into a < br / > and two into a < p >



    hey, i tried putting in code for a free hit counter and wordpress deleted the line of code.
    also, how do you actually insert images that you’ve uploaded onto wordpress???



    where can i learn basic html code in a simple and effective way?



    I spoke to Matt and he told me to drag and drop the images into your post after you have uploaded them in that screen below – it works but who would have thunk?



    TANK YOU PAULBARRY !!!!! ooo god i hate tinyMCE its a real shit



    okay maybe not ;)

The topic ‘Code To HTML’ is closed to new replies.