PDA

View Full Version : RichTextEditor & JSP



DesiTech
12-20-2006, 07:19 PM
1) Script Title: Rich Text Editor (for textareas)

2) Script URL (on DD): http://dynamicdrive.com/dynamicindex16/richtexteditor/index.htm

3) Describe problem:
I have a form where user post question and it call servlet and put values in DB. Fine. !!

Question # 1
I have admin to reply to that questions. So Admin use Rich Text Editor to reply. I have a problem displaying value from DB into this rich text editor when new line is enter in text area. If its simple one line text or sentences it has no porblem displaying in RTE.

what can I do on JSP or servlet to make it display in Admin's Rich Text Editor, irrespective of whether used new line enter or special character.

Question #2
In my DB I have value something like this: "This is test <span style="font-weight: bold;">ANSWER</span>" and when I try to display in RichTextEditor its not showing anything. may be bcoz of tags < and >

And when i saw the code I can see its getting value from DB correctly but not displaying ????????
here is the soure code:
/Usage: writeRichText(fieldname, html, width, height, buttons, readOnly)
writeRichText('answer', test <span style="font-weight: bold;">tetseta </span>e<span style="background-color: rgb(0, 204, 204);">wet</span>
, 700, 300, true, false);

Plz let me know how to solve Q1 & Q2