Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Need a Text Editor

Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to create a JSP based text editor. The Text editor is used to insert text, with Formatting into a database.
I cannot use an applet.
Please help
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what exactly do you need help with? if you are just trying to insert text in to a database, then you will need an html text area on the web page, and have that page submit to a jsp. the jsp will transform any text formatting characters in to something that won't corrupt the database, and then use jdbc to connect to the database and insert the information. that's the overview of the process, if that's what you were looking for.
if you need help specifically with how to create a fully-featured text editor on the web page, that is a different story - please post with what you need to do.
Saloon Keeper
Posts: 22284
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At the moment, you're out of luck. The only way to enter multiple lines of text in pure HTML is via the textarea input control and it doesn't support formatting, just raw characters.
We format our text on the JavaRanch using UBB, like so:

This is quoted text

but that requires manual markup - not friendly for casual users. If you want something more like Windows WordPad, you're limited to an ActiveX/.Net-style plugin (I don't recommend this, Unix/Linux and Macintosh users will get a display that's unusable), an Java applet with one of the Swing text editing controls, or a specialized plugin (once again, not all users may be able to work with this).
Posts: 67425
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually if you can deal with something that only works in IE, it has a little-known feature where you can put an iframe element into a special "design mode" where it acts like a small wysiwig editor.
Many web-based email sites use this mode when displayed in IE.
The details are gory so if an IE-only solution is acceptable please post such and I'll look up the details (which are fuzzy in my mind since it's been a while since I used it).
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to throw in another $.02, you could create a word pad out of javascript and then insert in db as text via hidden field. Heavy DHTML though.
[ December 03, 2002: Message edited by: dave nelson ]
    Bookmark Topic Watch Topic
  • New Topic