WordPress.org

Ready to get started?Download WordPress

Forums

Displaying HTML in Posts (13 posts)

  1. Ethilien
    Member
    Posted 8 years ago #

    No matter how hard I try I cannot seem to get HTML to actually display in a post (by display I mean that it is not parsed by the browser, it shows up as visible text on the page). I write a lot of posts relating to HTML, and I cannot get tinyMCE to let me display HTML.

    For instance, if I wanted to demonstrate how to write an html link, I type <a href="index.htm">Index</a> into the editor. At first it shows up as visible text, but if I open the HTML editor, the code is not escaped as I would expect it to be. Instead it shows up as <a href="index.htm">Index</a>. If I then close the HTML editor, what I wanted to appear as plain text suddenly becomes a link. If I save or publish the post without ever opening the HTML editor, the same thing happens.

    Even if I try escaping my HTML in the HTML editor, <a href=&quot;index.htm&quote>Index</a>, when I hit update it turns back into a link.

    The last option, typing the escaped HTML into the wysywig DOES work, sort of. If I save the post and continue editing, the href attribute suddenly becomes xhref, makes this method useless just as much as the others.

    Does anyone have a solution to this? Its worth noting that the version of tinyMCE available from its website doesn't do this. Any HTML typed into the wysiwyg is escaped in the HTML editor. Was this modification of tinyMCE intentional for use in WP?

  2. dannybcastillo
    Member
    Posted 8 years ago #

  3. vkaryl
    Member
    Posted 8 years ago #

    It's a problem.... but only if you insist on using the stupid useless wysiwyg.

    I doubt the plugin mentioned will work particularly well with the current version of wp, btw.

  4. dannybcastillo
    Member
    Posted 8 years ago #

    Vkaryl
    How do you create a post without the wysiwyg?

    I'm sorry for the question, but I am really new to WP.

  5. vkaryl
    Member
    Posted 8 years ago #

    Hi dannybcastillo -

    In wp-admin/users, very bottom of page, uncheck the box next to "Use the visual rich editor when writing" - that will automatically put you into normal edit/write/input mode.

  6. spencerp
    Member
    Posted 8 years ago #

    EDITED* Damn it! I'm too slow! =P Thanks for getting Vicki.. ;) =)

    In the blog control panel, go to you Users => Your Profile. Scroll to the bottom of page, and make sure the little box beside this: "Use the visual rich editor when writing" is unchecked.. then, click the Update Profile button..

    I hope this helps. =)

    spencerp

  7. dannybcastillo
    Member
    Posted 8 years ago #

    Thanks, I like the editor better now.

    Back to the question at hand, I tried writing the code for a link in code wrap. It still converted the title into a link. Is there something else I need to know.

  8. vkaryl
    Member
    Posted 8 years ago #

    Hiya.... if it's not very long, can you post the code here (be sure to use backticks!); if longer, post to http://pastebin.com, and post the link to the "bin" here, 'kay? Need to see what you're trying to do....

  9. dannybcastillo
    Member
    Posted 8 years ago #

    Example

    <a href="http://www.dannycastillo.com">Danny Castillo</a>

  10. spencerp
    Member
    Posted 8 years ago #

    I use this plugin, which seems to do the trick..well, I hope anyway.. =P
    http://priyadi.net/archives/2005/09/27/wordpress-plugin-code-autoescape/

    I hope this help. =)

    spencerp

  11. dannybcastillo
    Member
    Posted 8 years ago #

    Works like a charm.

    Thanks for everyones help.

    I just hope this helps the person that started this topic.

  12. vkaryl
    Member
    Posted 8 years ago #

    Yah, moi aussi.... sometimes stuff like this helps, and sometimes it totally wonks the OP's question....

  13. spencerp
    Member
    Posted 8 years ago #

    Glad to hear it works. =) ;) And yeah, *hopefully* it won't throw off the O.P. =/ [biting nails..] =P

    spencerp

Topic Closed

This topic has been closed to new replies.

About this Topic