• 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 ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

formatting plain text code

 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I'm working on a project that makes use of a JTextArea class and I'm saving text written as HTML. I would like to encorporate the ability to format plain text code just as you are doing here on this site using (code)(/code) indicators. I know I'm not showing the square brackets. I'm sure you understand why. Since someone has already created a class or method that does this kind of formatting, I didn't see any point in trying to re-invent the wheel. So, may I request a copy of the class or method responsible for formatting pain text code to HTML?

Many thanks,

Alan
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
UBB (the software this forum is using) is written in Perl, not Java.
However, the logic for implementing a feature like UBB's CODE tags is very straight-forward:
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aside from being in Perl, the UBB code is a commercial product we bought; I don't believe we're at liberty to give it away to people. However you may be interested in the code developed so far for our prospective open-source replacement for UBB:

http://sourceforge.net/projects/mvnsaloon
 
I am going down to the lab. Do NOT let anyone in. Not even this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!