|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I don't know if I should use jsp to format the query text result from a MySQL database, or if this should be done by choosing a specific field-data type in the dbase design.
I wanted to build a knowledge base, which shows a link (title) of a specific issue and by clicking that the script should fetch me a textfield. This is one big clutter, and i want it to have paragraphs, a specific font, bold, italic etc... How do I go about this, keeping in mind that users with little knowledge of html can insert their own (formatted) items? Many thanks in advance for your help. MyJSP. |
|
#2
|
|||
|
|||
|
Well I would post them HTML and text into a field in the database of TEXT (unlimited length) type. You should use something like our EditWorks control to let the users enter their own questions and what not, as adding HTML by hand is what we used to do, and trust me, it's a nightmare!
|
|
#3
|
|||
|
|||
|
You could make your own formatting "language" too. Similar to for example BB Code / vB Code / Whatever that's used in forums like vBulletin.
If you're going to allow HTML, you better make a function that removes all of the harmful tags (like </table>, </html>), or maybe one that removes all tags but the ones you specify in a config string.. or something ![]() As mytch said, their editworks control is probably the easiest way out.. but wouldn't the fact that he's using JSP cause some problems? ![]() Hope it works out for you! By the way, I'm actually working on a knowledge base system myself. (php) You can check it out at http://kbase.webpixels.net/
__________________
Best Regards, Håvard Lindset |
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > format text results from query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|