HighDots Forums  

Display html example code within html

alt.html.tags alt.html.tags


Discuss Display html example code within html in the alt.html.tags forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
GitarJake
 
Posts: n/a

Default Display html example code within html - 11-05-2004 , 10:12 AM






We have a need to be able to display html examples/information like this:

id="BannedCharactersList"><val>%</val><val>&amp;</val><val>!</val><v
al>&quot;</val></data>

i.e: a document on how to change the content of an xml, asp or html file to
fix a bug.

I am entering this content using a WYSIWYG HTML editor. Unfortunately, the
editor insists on trying to interpret the code.

Is there a tag to cause this code to be ignored?

Thanks,

Jake



Reply With Quote
  #2  
Old   
David Dorward
 
Posts: n/a

Default Re: Display html example code within html - 11-05-2004 , 01:43 PM






GitarJake wrote:

Quote:
We have a need to be able to display html examples/information like this:


id="BannedCharactersList"><val>%</val><val>&amp;</val><val>!</val><v
al>&quot;</val></data
http://www.allmyfaqs.com/faq.pl?Show_HTML_examples

Quote:
I am entering this content using a WYSIWYG HTML editor. Unfortunately,
the editor insists on trying to interpret the code.
Get a better editor.

Quote:
Is there a tag to cause this code to be ignored?
Not any more (since you can't represent the HTML code for "End of section
that shouldn't be interpreted as HTML" as that would end the section that
shouldn't be interpreted as HTML! Entities are much better.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is


Reply With Quote
  #3  
Old   
GitarJake
 
Posts: n/a

Default Re: Display html example code within html - 11-05-2004 , 07:28 PM



Hi David,

Thanks for replying.

I'm not much for html, I feel embarrassed!

You mentioned entities? Did I do this right?

I used the symbols I found at
http://www.w3.org/MarkUp/html-spec/html-spec_13.html and input them into the
view source section of the editor; so that:

&amp;

Looked like:

&#38;amp&#5&#57

When I saved, the text looked as planned:

&amp;

But, if I edit some other part of the document and re-save, it looks like:

&amp;

So, the view source window is updating the entities to be the code?

How can I get the actual code to display?


TIA

Jake


"David Dorward" <dorward (AT) yahoo (DOT) com> wrote

Quote:
GitarJake wrote:

We have a need to be able to display html examples/information like
this:



id="BannedCharactersList"><val>%</val><val>&amp;</val><val>!</val><v
al>&quot;</val></data

http://www.allmyfaqs.com/faq.pl?Show_HTML_examples

I am entering this content using a WYSIWYG HTML editor. Unfortunately,
the editor insists on trying to interpret the code.

Get a better editor.

Is there a tag to cause this code to be ignored?

Not any more (since you can't represent the HTML code for "End of section
that shouldn't be interpreted as HTML" as that would end the section that
shouldn't be interpreted as HTML! Entities are much better.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/
Home is where the ~/.bashrc is



Reply With Quote
  #4  
Old   
David Dorward
 
Posts: n/a

Default Re: Display html example code within html - 11-06-2004 , 03:20 AM



GitarJake wrote:
Quote:
Thanks for replying.
Please don't top post or full quote.
http://www.allmyfaqs.com/faq.pl?How_to_post

Quote:
I used the symbols I found at
http://www.w3.org/MarkUp/html-spec/html-spec_13.html and input them into
the view source section of the editor; so that:

&amp;

Looked like:

&#38;amp&#5&#57
Numeric entities are harder to read, I suggest you use the named one. Also,
you only need to convert the specific characters in the document I
referenced.

Quote:
But, if I edit some other part of the document and re-save, it looks like:

&amp;
Sounds like your editor is borked. Get a better one.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.