Gets or sets the text content of the RadEditor control inlcuding the HTML
markup.
Namespace: Telerik.WebControls
Assembly: RadEditor (in RadEditor.dll)
Syntax
| Visual Basic (Declaration) | |
|---|
Public Property Html As String |
| Visual Basic (Usage) | Copy Code |
|---|
Dim instance As RadEditor
Dim value As String
instance.Html = value
value = instance.Html
|
| C# | |
|---|
public string Html {get; set;} |
Return Value
The text content of the RadEditor control including the HTML markup. The default is
string.Empty.
Example
This example demonstrates how to set the content of the RadEditor inline and the
differences between the Html,
Text and the
Xhtml properties.
<rade:radeditor id="RadEditor1" runat="server"
saveinfile="false" editable="true">
<b>t</b>elerik RadEditor<br>
the best <span style="COLOR: red">html editor</span> in the
world
</rade:radeditor>
<asp:button id="btnSave" runat="server" text="Submit"
onclick="btnSave_Click" /><br />
Html:<asp:label runat="server" id="LabelHtml"></asp:label><br
/>
Text:<asp:label runat="server" id="LabelText"></asp:label><br
/>
Xhtml:<asp:label runat="server" id="LabelXhtml"></asp:label>
| Visual Basic | Copy Code |
|---|
Private Sub btnSave_Click(sender As Object, e As System.EventArgs)
LabelHtml.Text = Server.HtmlEncode(RadEditor1.Html);
LabelText.Text = Server.HtmlEncode(RadEditor1.Text);
LabelXhtml.Text = Server.HtmlEncode(RadEditor1.Xhtml);
End Sub
|
| C# | Copy Code |
|---|
private void btnSave_Click(object
sender, System.EventArgs e)
{
//HtmlEncode the content of the editor to display the HTML tags
LabelHtml.Text = Server.HtmlEncode(RadEditor1.Html);
LabelText.Text = Server.HtmlEncode(RadEditor1.Text);
LabelXhtml.Text = Server.HtmlEncode(RadEditor1.Xhtml);
}
|
Remarks
Requirements
Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also