Solved

Notepad and <TextArea>

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Find out what you should include to make the best professional email signature for your organization.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

831 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