July 15th, 2010, 04:31 AM
WPF Rich Text Editor vs HTML Rich Text Editor
I have a requirement in which I need to accept formatted text inputs from web page and save into database. further I have to generate word documents merging all the fields' formatted data into one doc. I thought to use a Rich Text Editor (HTML) on Asp.Net web page and saving HTML into Database and then from DB create the word doc by reading HTML from the fields (There may be some fields from which I also need to pick data and put at a particular location in the word doc).
I know that we can generate RTF docs from HTML but are they fully conform with the RTF specifications means in parsing they should not create any table or any other object in word document if it is not present in Rich Text Editor. I mean to say that if I am writing something in para in Rich Text Box the text should come in para in my word doc (WYSIWYG).
Actually business users want to do formatting as they do in MS Word and then output (in .doc/.docx) should be exactly the same. Can we provide this by using HTML Rich Text Editor?
Secondly I have also tried WPF XBAP to provide Rich Interface, where I am getting all the rich text formatting options in WPF’s Rich Text Box. As user wants this on the web I am hosting my XBAP application in my .aspx page. To interact with database I am calling a WCF service in XBAP as there is restriction that File I/O and DB related activities cannot be performed directly if we are using XBAP with partial trust. I am using partial trust as I don’t want to install/download anything on client’s machine certificates/application. I just want that user should feel as they are using the a normal web page. I am generating XAML from RTB and saving it in the DB fields and from the fields I am converting XAML into .doc/docx.
What I want to know is which approach should I use:
simple HTML Rich Text Editor approach or WPF’s XBAP?
If I use HTML Rich Text Editor approach, Can this approach provide me all the capabilities as mentioned?
If I use XBAP will it be a good solution in terms of manageability , performance or any other thing?
In simple words what approach should I use?
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!