formatting part of a text field

Posted on 2009-02-11
Medium Priority
Last Modified: 2013-11-19
i have the code below that basically is a reply to a message that when the user submits it puts the original message underneath whatever they type in, what i need is to format <%=reformat(rsMsg.Fields.Item("Body").Value)%> as a smaller font.  i tried using css but that will only format the whole textarea, any ideas just to format that one part?
<textarea name="body" cols="50" rows="10" wrap="VIRTUAL" onChange="getTheText(this)" onClick="getTheText(this)">                                                                                                         ------------------------------             <%=reformat(rsMsg.Fields.Item("Body").Value)%></textarea>

Open in new window

Question by:ckawebcreation

Accepted Solution

-null- earned 375 total points
ID: 23614829

CSS will only apply to the whole textarea, on it's own there is no way to format individual lines in the way you require.  Your options are to use a div in place of the textarea, which will allow you to format the text, use contenteditable on an iframe, to enable you to write rich text to it or use an off the shelf richtext editor from yahoo's yui project, or similar.

The chosen route really depends on whether or not you want the user to be able to edit the outputted text, or just read and/or selected it for copy/paste.


Author Comment

ID: 23615023
cheers, i didn't think so.

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Question has a verified solution.

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

Ready to get certified? Check out some courses that help you prepare for third-party exams.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses
Course of the Month17 days, 13 hours left to enroll

829 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