Begineer with ck editor faciBegineer with ck editor facingng issue while highlighting the error text
Below is my code which compares the text entered in two ck editors and display the text in third ckeditor by highlighting the error text.that means i will give some text in ckeditor1 and CKEditorControl1 and when i click button compare i will show the highlighted error text in third ckeditor.But now the requirement is exactly revers to this.I wil give text only in one ck editor that is in ckeditor1 and eliminate some text in that ckeditor1 and click compare button then i should show two ckeditors CKEditorControl1 and CKEditorControl2 with actual text in CKEditorControl1 and error text in CKEditorControl2 how can i do this.I am a begineer and very new to this can anyone help me out<div>
<CKEditor:CKEditorControl ID="CKEditor1" BasePath="/ckeditor/" runat="server" Width="1108px" Height="143px">
</CKEditor:CKEditorControl>
<br />
<br />
</div>
<div>
<CKEditor:CKEditorControl ID="CKEditorControl1" BasePath="/ckeditor/" runat="server" Width="1105px" Height="163px"></CKEditor:CKEditorControl>
<br />
<asp:Button ID="btn_compare" runat="server" OnClick="btn_compare_Click" Text="Compare" />
<br />
<br />
</div>
<div>
<CKEditor:CKEditorControl ID="CKEditorControl2" BasePath="/ckeditor/" runat="server" Width="1117px" Height="331px"></CKEditor:CKEditorControl>
</div>
protected void btn_compare_Click(object sender, EventArgs e)
{
string s1 = CKEditor1.Text;
string f1 = Regex.Replace(s1, @"<[^>]+>| |'", "").Trim();
string s2 = CKEditorControl1.Text;
string f2 = Regex.Replace(s2, @"<[^>]+>| |'", "").Trim();
diff_match_patch dmp = new diff_match_patch();
// var diffs = dmp.diff_main(f2, f1, false);
var diffs = dmp.diff_lineMode(f2, f1);
dmp.diff_cleanupSemanticLossless(diffs);
var html = dmp.diff_prettyHtml(diffs);
CKEditorControl2.Text = html;
}