Hämta innehåll på något element i contentEditorWebpart
By Anatoly Mironov
string content = welcomeWebpart.Content.InnerText;
//get heading
string heading = string.Empty;
Match m = Regex.Match(content, @"(
.\*?
====
)", RegexOptions.Singleline);
if (m.Success)
{
heading = m.Groups\[1\].Value;
}
heading = Regex.Replace(heading, @"(
|
=
)", "", RegexOptions.Singleline);
welcomeValues.Add("#HEADING#", heading);