Hello Emmy,
Can you please try this code for displayng the Rich text box content into the Expression Box. I think this will help you.
public static void SetRichTextNodeValue(IXMLDOMNode expressionBoxNode, IXMLDOMNode richTextBoxNode)
{
if (expressionBoxNode == null || richTextBoxNode == null)
return;
if (richTextBoxNode.text == "")
{
expressionBoxNode.text = String.Empty;
return;
}
if (richTextBoxNode.firstChild == null)
{
string value = richTextBoxNode.ToString();
if (richTextBoxNodes.text != value)
expressionBoxNode.text = value;
}
else
{
expressionBoxNode.text = String.Empty;
IXMLDOMNodeList childNodes = richTextBoxNode.childNodes;
foreach (IXMLDOMNode childNode in childNodes)
{
expressionBoxNode.appendChild(childNode.cloneNode(true));
}
}
}