Re: R: How to render html embedded in a text-area?
According to the Struts API: ActionConfig.getPath() Return context-relative path of the submitted request, starting with a slash ("/") character, and omitting any filename extension if extension mapping is being used. But, System.err.println (mapping.findForward (Constants.FORWARD_BANNER).getPath()); System.err.println (mapping.getPath() ); prints: /banner.do /offsite I am expecting "/banner" not "/banner.do". I am using extension mapping. Am I missing the point? How should I get "/banner" from Constants.FORWARD_BANNER? Thx. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: R: How to render html embedded in a text-area?
Yeah, it looks great. Something to keep in mind when building webapps which need some text editing :D On Wed, 4 Aug 2004 14:24:49 +1200, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > I've just shown these rich-text editors to our users and they are ecstatic. > Thanks to everybody who responded - amazing where a simple question will > lead. > > Regards, > John > > [EMAIL PROTECTED] > Ph (09) 372-5010 > > |-+> > | | "Simone - Dev" | > | | <[EMAIL PROTECTED]| > | | ling.com>| > | || > | | 04/08/2004 09:01 | > | | AM | > | | Please respond to| > | | "Struts Users| > | | Mailing List"| > | || > |-+> > > >--| > | > | > | To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> > | > | cc: > | > | Subject: R: How to render html embedded in a text-area? > | > > >--| > > Just want to point out a few things > > On the fckeditor.net site there is just the new beta 2.0 version (that > already include the JSP tag lib) > > For a production environment I suggest the use of the 1.6 stable version > http://sourceforge.net/project/showfiles.php?group_id=75348&package_id=7 > 5845&release_id=236998 > > It already include a tag lib version, too... > lib support > The one avalible on my site was a pre-release version of the JSP tag. > > Simone > > - > Simone Chiaretta > www.piyosailing.com/S > Any sufficiently advanced technology is indistinguishable from magic > "Life is short, play hard" > > > -Messaggio originale- > > Da: Niall Pemberton [mailto:[EMAIL PROTECTED] > > Inviato: martedì 3 agosto 2004 22.07 > > A: Struts Users Mailing List > > Oggetto: Re: How to render html embedded in a text-area? > > > > > > Another one of these is also FCKeditor: > > > > http://www.fckeditor.net/ > > > > > > Theres a JSP tag version here: > > http://www.piyosailing.com/S/index.jsp?redirUrl=/S/programming > > -opensource.jsp > > > > Niall > > > > - Original Message - > > From: "Christian Bollmeyer" <[EMAIL PROTECTED]> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > > Sent: Tuesday, August 03, 2004 6:35 PM > > Subject: Re: How to render html embedded in a text-area? > > > > > > > On Tuesday 03 August 2004 17:34, John McGrath wrote: > > > > > > Something possibly even cooler (as long as the client is > > > IE 5.5+; otherwise, it won't show up) I recently stumbled over is > > > > > > http://www.interactivetools.com/products/htmlarea/ > > > > > > which turns a into a configurable WYSIWYG > > > HTML editor. Easy to use and 'BSD licensed', IIRC. > > > > > > -- Chris. > > > > > > > javascript'll preserve line feeds. functions below. to replace > > > > newlines with tags when submitting, do this: > > > > > > > > > > > > > > > > then to convert the other way, say when editing the same content, > > > > put this or something like it at the bottom of the page: > > > > > > > > > > > > <!-- > > > > htmlToNewlines( document.forms[0] ); > > > > //--> > > > > > > > > > > > > > > > > > > > > function htmlToNewlines( theForm ) { > > > > for( var i=0; i > > > if( theForm.elements[i].type == "textarea" ) { > > > > theForm.elements[i-1].value = > > > > theForm.elements[i-1].value.replace(//g,'\n'); > > > > } > > > > } > > > > } > > > >
Re: R: How to render html embedded in a text-area?
I've just shown these rich-text editors to our users and they are ecstatic. Thanks to everybody who responded - amazing where a simple question will lead. Regards, John [EMAIL PROTECTED] Ph (09) 372-5010 |-+> | | "Simone - Dev" | | | <[EMAIL PROTECTED]| | | ling.com>| | || | | 04/08/2004 09:01 | | | AM | | | Please respond to| | | "Struts Users| | | Mailing List"| | || |-+> >--| | | | To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> | | cc: | | Subject: R: How to render html embedded in a text-area? | >--| Just want to point out a few things On the fckeditor.net site there is just the new beta 2.0 version (that already include the JSP tag lib) For a production environment I suggest the use of the 1.6 stable version http://sourceforge.net/project/showfiles.php?group_id=75348&package_id=7 5845&release_id=236998 It already include a tag lib version, too... lib support The one avalible on my site was a pre-release version of the JSP tag. Simone - Simone Chiaretta www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic "Life is short, play hard" > -Messaggio originale- > Da: Niall Pemberton [mailto:[EMAIL PROTECTED] > Inviato: martedì 3 agosto 2004 22.07 > A: Struts Users Mailing List > Oggetto: Re: How to render html embedded in a text-area? > > > Another one of these is also FCKeditor: > > http://www.fckeditor.net/ > > > Theres a JSP tag version here: > http://www.piyosailing.com/S/index.jsp?redirUrl=/S/programming > -opensource.jsp > > Niall > > - Original Message - > From: "Christian Bollmeyer" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > Sent: Tuesday, August 03, 2004 6:35 PM > Subject: Re: How to render html embedded in a text-area? > > > > On Tuesday 03 August 2004 17:34, John McGrath wrote: > > > > Something possibly even cooler (as long as the client is > > IE 5.5+; otherwise, it won't show up) I recently stumbled over is > > > > http://www.interactivetools.com/products/htmlarea/ > > > > which turns a into a configurable WYSIWYG > > HTML editor. Easy to use and 'BSD licensed', IIRC. > > > > -- Chris. > > > > > javascript'll preserve line feeds. functions below. to replace > > > newlines with tags when submitting, do this: > > > > > > > > > > > > then to convert the other way, say when editing the same content, > > > put this or something like it at the bottom of the page: > > > > > > > > > <!-- > > > htmlToNewlines( document.forms[0] ); > > > //--> > > > > > > > > > > > > > > > function htmlToNewlines( theForm ) { > > > for( var i=0; i > > if( theForm.elements[i].type == "textarea" ) { > > > theForm.elements[i-1].value = > > > theForm.elements[i-1].value.replace(//g,'\n'); > > > } > > > } > > > } > > > > > > function newlinesToHtml( theForm ) { > > > for( var i=0; i > > if( theForm.elements[i].type == "textarea" ) { > > > theForm.elements[i-1].value = > > > theForm.elements[i-1].value.replace(/\n/g, ''); > > > } > > > } > > > } > > > > > > > > > > > > > > > -Original Message- > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > > Sent: Monday, August 02, 2004 9:24 PM > > > To: Struts Users Mailing List > > > Subject: Re: How to render html embedded in a text-area? > > > > > > > > > > > > > > > > > > > > > &g
R: How to render html embedded in a text-area?
Just want to point out a few things On the fckeditor.net site there is just the new beta 2.0 version (that already include the JSP tag lib) For a production environment I suggest the use of the 1.6 stable version http://sourceforge.net/project/showfiles.php?group_id=75348&package_id=7 5845&release_id=236998 It already include a tag lib version, too... lib support The one avalible on my site was a pre-release version of the JSP tag. Simone - Simone Chiaretta www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic "Life is short, play hard" > -Messaggio originale- > Da: Niall Pemberton [mailto:[EMAIL PROTECTED] > Inviato: martedì 3 agosto 2004 22.07 > A: Struts Users Mailing List > Oggetto: Re: How to render html embedded in a text-area? > > > Another one of these is also FCKeditor: > > http://www.fckeditor.net/ > > > Theres a JSP tag version here: > http://www.piyosailing.com/S/index.jsp?redirUrl=/S/programming > -opensource.jsp > > Niall > > - Original Message - > From: "Christian Bollmeyer" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > Sent: Tuesday, August 03, 2004 6:35 PM > Subject: Re: How to render html embedded in a text-area? > > > > On Tuesday 03 August 2004 17:34, John McGrath wrote: > > > > Something possibly even cooler (as long as the client is > > IE 5.5+; otherwise, it won't show up) I recently stumbled over is > > > > http://www.interactivetools.com/products/htmlarea/ > > > > which turns a into a configurable WYSIWYG > > HTML editor. Easy to use and 'BSD licensed', IIRC. > > > > -- Chris. > > > > > javascript'll preserve line feeds. functions below. to replace > > > newlines with tags when submitting, do this: > > > > > > > > > > > > then to convert the other way, say when editing the same content, > > > put this or something like it at the bottom of the page: > > > > > > > > > > > > > > > > > > > > > > > > function htmlToNewlines( theForm ) { > > > for( var i=0; i > > if( theForm.elements[i].type == "textarea" ) { > > > theForm.elements[i-1].value = > > > theForm.elements[i-1].value.replace(//g,'\n'); > > > } > > > } > > > } > > > > > > function newlinesToHtml( theForm ) { > > > for( var i=0; i > > if( theForm.elements[i].type == "textarea" ) { > > > theForm.elements[i-1].value = > > > theForm.elements[i-1].value.replace(/\n/g, ''); > > > } > > > } > > > } > > > > > > > > > > > > > > > -Original Message- > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > > Sent: Monday, August 02, 2004 9:24 PM > > > To: Struts Users Mailing List > > > Subject: Re: How to render html embedded in a text-area? > > > > > > > > > > > > > > > > > > > > > > > > Looks like I went a bit over the top with the embedded html > > > proposal. > > > > > > It seems the users would be content if whatever they'd > keyed into a > > > text-area looked the same when subsequently re-displayed > as text in > > > a document. > > > > > > ie just preserve the line-feeds, no need for bolding etc. > > > > > > Any ideas? > > > > > > >If you want someone to see the visualized text as they > are typing, > > > >you're going to need something like a "rich text" > component that > > > >does that sort of thing in JavaScript. The standard HTML > > > > element > > > > > > > >that Struts uses doesn't help you, even if the HTML elements are > > > >literally embedded. > > > > > > > >If you are taking content and then literally embedding > it in your > > > >page with something like , you can turn off the > > > >filtering by saying filter="false" in the attributes of > this tag. > > > >Be aware, however, that in doing so *you* are taking > responsibility > > > >for avoiding cross site scripting attacks from potentially > > > >malicious users that try to embed JavaScript markup. > Most likely, > > > >you'll need to scan the text and only allow HTML > elements that are > > > >reasonably harmless (like ). > > > > > > > > > > > >Craig > > > > > > > >> Hi All, > > > >> > > > >> I have a struts app that lets users input into text-areas. > > > >> Whatever the user entered will later be displayed as text. To > > > >> give users some control over presentation, I'd like to > allow them > > > >> to enter html directly into a text-area. Struts appears to > > > >> convert all html to harmless displayable text, so that > > > >> appears quite literally as '' rather than as a horizontal > > > >> line. > > > >> > > > >> How can I allow users to input effective html? And is > there any > > > >> way I > > > > > > can > > > > > > >> ring-fence what they enter, so that any html errors they make > > > >> don't > > > > > > bring > > > > > > >> the whole page down? > > > > > > > > > > - > > > To unsubscribe, e-mail