I should add, too, that if you want to give the users a means to enter the data with HTML changes but without requiring them to know HTML, there are a couple of alternatives out there to achieve that. The user is shown a "rich text editor" instead of a textarea. It can still be just a small part of a bigger page: it doesn't take over the entire user interface. They just see like a mini word processor in the equivalent space of a textarea, with buttons for setting bold, italics, underline, changing fonts, and lots lots more. That resulting code appears to your form processing page as the same HTML they'd have built in your current approach, but of course it's a WYSIWYG editor to the user and they needn't know HTML.
Two classic solutions in the CF world are EWebEditPro (http://www.ektron.com/ewebeditpro.cfm) from Ektron.com, and ActiveEdit (http://www.cfdev.com/activedit/) from CFDev.com. Both sites have live demos for you to see what the tools are about. /charlie -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of charles arehart Sent: Tuesday, March 05, 2002 11:58 AM To: [EMAIL PROTECTED] Subject: RE: [CFTALKTor] using HTML in TEXTAREA of CFFORM Glad to hear that the tag has helped, Bill. It's my tag. :-) But I'm not sure that it will help in Graham's case. Graham, you're not trying to display the code that was entered in the textarea in anything than another textarea, right? My tag would be useful if you were, but it seems you're giving them the chance to edit what was entered, saved in a DB and retrieved for edit, right? And you're showing the code in another Textarea, right? It seems then that the problem may be in the database. I mean, have you displayed the code before the insert, and then after retrieving it from the database? If you view it in a textarea, it should look just like they entered it (HTML and all). If you wanted to view it outside a textarea and wanted to see the raw HTML, that's what the HTMLCodeFormat function is for, as you mentioned. If you did for some reason want to view the code not as HTML and not in a textarea but instead just for display as HTML, that's where my tag comes in. Whereas the ParagraphFormat converts double carriage returns to a <p>, it doesn't convert a single carriage return to a <br>, nor does it respect spaces or tabs entered or copied into the textarea. Those are the problems that CF_TextAreaFormat would help solve. But I don't think that's really the challenge you're facing. /charlie -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bill Sourour Sent: Tuesday, March 05, 2002 9:10 AM To: [EMAIL PROTECTED] Subject: Re: [CFTALKTor] using HTML in <TEXTAREA> of <CFFORM> For handling these types of issues, I always use this custom tag and it seems to work great. http://www.systemanage.com/cff/textareaformat_help.cfm Give it a go. ----- Original Message ----- From: "Graham Faulkner" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 05, 2002 9:07 AM Subject: [CFTALKTor] using HTML in <TEXTAREA> of <CFFORM> > Hi there, > > I'll try to explain this without getting myself, or you, too confused... =) > > I have an online admin tool for my client for their calendar of events. > They are able to enter the details for the event into a <textarea> field in > the <cfform>. The <textarea> corresponds to a Memo-type field in an Access > 2000 database. The information saved in the db field is outputted on the > website using #ParagraphFormat(Description)# so that all paragraph breaks, > etc. are retained. > > However, when I enter in HTML code (e.g. email addresses using <a > href="mailto:blahblah">) into the <textarea> it does something funny when I > go back in a second time to re-edit the information. It will copy some of > the text and place it before the previously existing text. > > For example, if I entered the following > > PARAGRAPH START... This is some sample text. Here is a website you > should look at: <a href="url here" target="_self">url</a>. You should also > email the friendly people at CFUG - click <a > href="mailto:cftalk?subject=this is a test">here</a>. This is some more > sample text. > > What would happen is that it looks something like this when I go back in to > edit it again (copies some of the text and places it at the beginning): > > url here" target="_self">url</a>. You should also email the friendly > people at CFUG - click <a href="mailto:cftalk?subjet=this is a > test">here</a>. PARAGRAPH START... This is some more sample text. This is > some sample text. Here is a website you should look at: <a href="url here" > target="_self">url</a>. You should also email the friendly people at CFUG - > click <a href="mailto:cftalk?subject=this is a test">here</a>. This is some > more sample text. > > What can I do to stop this, but still ensure that they can enter in HTML > code if desired. If they type in plain text, it works fine. It's the HTML > code that's ruining the party. =) I tried #HTMLCodeFormat(Description)# in > the <textarea> but that didn't seem to do the trick. Any suggestions would > be gratefully appreciated. > > Blessings, > > Graham - You are subscribed to the CFUGToronto CFTALK ListSRV. This message has been posted by: "charles arehart" <[EMAIL PROTECTED]> To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/ Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/ This System has been donated by Infopreneur, Inc. (http://www.infopreneur.net) - You are subscribed to the CFUGToronto CFTALK ListSRV. This message has been posted by: "charles arehart" <[EMAIL PROTECTED]> To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/ Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/ This System has been donated by Infopreneur, Inc. (http://www.infopreneur.net)
