Solved

Notepad and <TextArea>

Posted on 2008-10-28
4
312 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

758 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now