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

can RadTextBox render html tags?

6 Answers 703 Views
Input
This is a migrated thread and some comments may be shown as answers.
d-cpt
Top achievements
Rank 2
d-cpt asked on 10 Sep 2009, 09:02 PM
Hi,

I wonder how I can get my RadTextBox render html tags like Rad TextBox is great insteads of show them out like this
<strong>Rad TextBox is great</strong>

Thank you,

d-cpt

6 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 11 Sep 2009, 06:46 AM
Hi d-cpt,

You can use RadEditor instead. RadTextBox does not support HTML.

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
d-cpt
Top achievements
Rank 2
answered on 11 Sep 2009, 03:48 PM
Hi Vlad,

Thank you for your reply. I really like the RadEditor.
How I set it to wrap a long link or long word? The pasted text has a long url link that is not wrapped and expand out of the editor box.
I set the RadEditor Width but it growth out of preset size. How to keep its width fixed?

 

<table width="100%" style="vertical-align:top; table-layout: fixed">

 

 

<tr>

 

 

<td style="width: 2%">&nbsp;</td>

 

 

<td style="width: 48%; vertical-align:top">

 

 

<asp:PlaceHolder ID="placeholderNewVisit" runat="server" />

 

 

</td>

 

 

<td style="width: 48%; vertical-align:top">

 

 

<b>Advising Notes:</b>

 

 

<br />

 

 

<telerik:RadEditor ID="rtbNote" runat="server" AutoResizeHeight="True" BorderStyle="Solid" BorderColor="Gainsboro"

 

 

BorderWidth="1px" Width="98%" ToolsWidth="98%">

 

 

</telerik:RadEditor>

 

 

</td>

 

 

<td style="width: 2%">&nbsp;</td>

 

 

</tr>

 



Thanks,

d-cpt
0
Accepted
Rumen
Telerik team
answered on 16 Sep 2009, 08:33 AM
Hi,

You can wrap a long string on the next line when applying word-wrap: break-word; to the body of the RadEditor's content area. You can do that by setting the CssFiles property of RadEditor to point to external css file, which contains a global body class with word-wrap: break-word; in it.

You can see the following help article for more information: Content area appearance problems.

If you experience any problems, open a support ticket and send a sample working project along with reproductions steps.

Sincerely,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
d-cpt
Top achievements
Rank 2
answered on 16 Sep 2009, 01:37 PM
Hi,

I tried with your advice but RadEditor still doesn't  wrap a long word.
The word-wrap is a feature of CSS 3.0 but my VS2008 currently set to CSS 2.1.
So how I get my VS2008 recognize CSS 3.0?
Beside of this one, how I can set my RadEditor's width stays fixed.

Thanks again,

d-cpt
0
Rumen
Telerik team
answered on 21 Sep 2009, 10:22 AM
Hi,

For your convenience I have attached a sample project in which the editor is configured using the word-wrap css property to wrap a very long string to a new line. I also attached a video demonstrating my test.

You should set the RadEditor's Width property in pixels to make its width fixed.

P.S. Our support is concentrated on our products only and I cannot provide a solution for your question concerning Visual Studio 2008 and CSS 3.0 support. You can search in Google for a solution for this problem.

All the best,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
d-cpt
Top achievements
Rank 2
answered on 21 Sep 2009, 01:38 PM
Thanks for the reply.

I got the radeditor wraps a long word by add some codes at runtime without using CSS:

rtbNote.Attributes[

"Style"] = "word-wrap: break-word";

The width setting in pixel does not work for me. I think it caused by the toolbar that does not wrap (try to resize it).

It is common that your product is bought to be used with Visual Studio and CSS. That what your tool is built for, right?
So providing some extra helps is what I would do rather than say "Our support is concentrated on our products only" which everybody already know. I didn't ask you how to fix my car here. :)

 


Tags
Input
Asked by
d-cpt
Top achievements
Rank 2
Answers by
Vlad
Telerik team
d-cpt
Top achievements
Rank 2
Rumen
Telerik team
Share this question
or