[]
        
(Showing Draft Content)

C1.Win.C1Editor.C1TextRange.SetXmlElement

SetXmlElement Method

SetXmlElement(XmlElement)

Replaces the text range content with the given element of XmlElement type.

Declaration
public void SetXmlElement(XmlElement element)
Public Sub SetXmlElement(element As XmlElement)
Parameters
Type Name Description
XmlElement element

An XmlElement to replace the range content.

Examples

The example replaces selected text with a div XmlElement.

private void button1_Click(object sender, EventArgs e)
{
XmlElement node = c1Editor1.Document.CreateElement("div");
node.InnerText = "New Element";
c1Editor1.Selection.SetXmlElement(node);
}