This is a migrated thread and some comments may be shown as answers.

RichTextBox Html Parsing

3 Answers 144 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Stanescu Mihai
Top achievements
Rank 1
Stanescu Mihai asked on 22 Oct 2010, 02:07 PM
Hello telerik team,

I would like to know how to use html parser to return html version 2.0 from the richtextbox.

What i would like to get is something like this:

<b> bold text </b>
<i> italic text </i>
as oposed to what i am getting now with styleexportmode set to inline:
<p style="margin: 0px 0px 0px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px;"><span style="font-family: 'Verdana';font-style: Normal;font-weight: bold;font-size: 16px;color: #000000;">bold text</span><span style="font-family: 'Verdana';font-style: Normal;font-weight: normal;font-size: 16px;color: #000000;" /></p>
<p style="margin: 0px 0px 0px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px;"><span style="font-family: 'Verdana';font-style: Italic;font-weight: normal;font-size: 16px;color: #000000;">italic text</span><span style="font-family: 'Verdana';font-style: Normal;font-weight: normal;font-size: 16px;color: #000000;" /></p>

Thanks for the reply.

3 Answers, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 27 Oct 2010, 01:46 PM
Hello Stanescu Mihai,

Unfortunately, you cannot customize the output that the HTML provider produces for now. We have planned to allow some options, but I am afraid such a great change is not on our to-do list.
If you need to generate the code you have added as an example, you would have to create your own format provider implementing IDocumentFormatProvider in your desired fashion. This task would not be trivial, however If you decide to use this approach you can open a support ticket and we can send you the source code of our Html export provider that you should customize further.

If you have any other questions, feel free to get back to us.


All the best,
Iva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Stanescu Mihai
Top achievements
Rank 1
answered on 02 Nov 2010, 09:18 AM
Thank you for the response,

I would like to create my own format provider. Do I need to open a support ticket, or can you send them by e-mail?
0
Accepted
Iva Toteva
Telerik team
answered on 03 Nov 2010, 08:36 AM
Hello Stanescu Mihai,

Opening a support ticket is the preferred way.
Please refer to the support ticket you opened for the answer to your request.

Sincerely yours,
Iva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
RichTextBox
Asked by
Stanescu Mihai
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Stanescu Mihai
Top achievements
Rank 1
Share this question
or