xtricks: color snail picture w/ xtricks (Default)
xtricks ([personal profile] xtricks) wrote in [community profile] getting_started2011-05-19 04:29 pm
Entry tags:

Markup to show HTML code?

The question was asked here: http://getting-started.dreamwidth.org/9572.html?nc=15#comments

And the final comment links to a page that is now dead on how to do it for LJ.

I'm looking for the HTML coding to put in (part of) a post that prevents DW from reading and applying the HTML codes so I can have a little box that people can copy to get a template that includes the raw HTML.

I've seen it around, so I know it's possible (often as a little scroll box). Like everyone else, I tried raw-code and got the lack of breaks. When I try code (which DW says is a valid HTML tag for the site) I get my text in tiny courier print.

Is there such a code in DW or can someone link me to a current tutorial on how to make what I'm looking for?
somnolentblue: statue of a woman from the waist up (Default)

[personal profile] somnolentblue 2011-05-19 11:39 pm (UTC)(link)
I do little scrollboxes sometimes that people can just cut and paste, but I use the workaround of using & l t ; [without spaces] for < and & g t ; [without spaces] >. So my <a href="http://whatever goes here">address</a> is actually & lt ;a href=" "& gt ; address & lt ; /a & gt ;. It's not what you're looking for, but it works. ETA: Aaaand clicking at the original post, I saw that it was mentioned there.
Edited 2011-05-19 23:45 (UTC)
stormy: βͺ ππŽπ“πˆπ‚π„ ❫ 𝑫𝑢 𝑡𝑢𝑻 𝑻𝑨𝑲𝑬 𝑴𝒀 𝑰π‘ͺ𝑢𝑡𝑺 ⊘ (Default)

[personal profile] stormy 2011-05-19 11:42 pm (UTC)(link)
You're looking to put your HTML surrounded by <textarea> & </textarea> tags.
marahmarie: (M In M Forever) (Default)

[personal profile] marahmarie 2011-05-20 03:07 am (UTC)(link)
If you want to put raw HTML or any kind of code into your posts without using a textarea tag, there's a generator for that:

http://www.raffoul.ca/users/masterslacker/ljhtmlparser.php

(couldn't have lived without it over the years, since hand-coding raw html is so not my thing)
turlough: large orange flowers in lush green grass ((mcr) gerard way has the sweetest smile)

[personal profile] turlough 2011-05-28 04:11 pm (UTC)(link)
I lost the URL for that one some time ago, so thank you very much for supplying it!
marahmarie: (M In M Forever) (Default)

[personal profile] marahmarie 2011-05-28 11:40 pm (UTC)(link)
You're welcome! :)
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. β˜€ (Default)

[personal profile] sophie 2011-09-28 04:13 pm (UTC)(link)
And just in case that link disappears, the manual way to have code showing up without the HTML being parsed is to do the following steps in order in a text editor:

1. Replace the string "&" with the string "&".
1. Replace the string "<" with the string "<".
1. Replace the string ">" with the string ">".

After doing that you'll have HTML that looks "something like &lt;em&gt;this&lt;/em&gt;". You should then copy and paste that into your entry, and it'll show up as you want it to. In this case, that code would show up as "something like <em>this</em>".
Edited (Oops, fixing mock-HTML. Sorry for the edit spam!) 2011-09-28 16:15 (UTC)