[]
Replaces the text range content with the given element
of XmlElement type.
public void SetXmlElement(XmlElement element)
Type | Name | Description |
---|---|---|
XmlElement | element | An XmlElement to replace the range content. |
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);
}