Solved

Notepad and <TextArea>

Posted on 2008-10-28
4
316 Views
Last Modified: 2010-04-09
In Notepad and the <TextArea>, I set the same font type, Lucide Console, wrote the same text:
first line was Chinese characters, then ENTER, 5 spaces, number 678, ENTER, 5 spaces, number 678.
In Notepad, it displayed as expected:

L-ýW
     678
     678

However, in <TextArea>, the first 678 shifted to left hand side

L-ýW
    678
     678

What I can do to make the text in <TextArea> looks the same as in Notepad?
0
Comment
Question by:markdot
  • 2
4 Comments
 

Expert Comment

by:prlamnguyen
ID: 22826705
I think in TextArea of HTML you should use &nbsp; at the begin of the text if you have more than 1 space.
So, did you try: Ctrl + Shift + Space ?
0
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 125 total points
ID: 22827413
"What I can do to make the text in <TextArea> looks the same as in Notepad?"

Nothing.  Text area HTML style contains no formatting at all, it is just a TEXT area.  If you want something different that can retain all formatting, then consider rich text area -- that does all the formatting you need --

www.textarearich.com/
www.dynamicdrive.com/dynamicindex16/richtexteditor/index.htm
www.tcpiq.com/tcpIQ/HTMLRichTextArea/
www.topshareware.com/HTML-Rich-Text-Area-download-1456.htm
0
 

Author Comment

by:markdot
ID: 22827434
Thank you.
I mean the content in TextArea, am not considering after posting the content.
I want the text in <TextArea> looks the same as in Notepad.
0
 

Author Comment

by:markdot
ID: 22827489
scrathcyboy,

sorry, I didn't read your comment when I typed mine.
What I need is a TextArea that accepts any continuous spaces and tabs WHEN THE USER PASTE TEXT FROM OTEHR TEXT EDITOR, and uses monospace. If a rich text area can do this, can you tell me how to include it in Html?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question