Dear Telerik team,
I was trying to bind "Source" and "data for HTML string" of "RadRichTextEditor" but, when I tried to change the bound value to another value, it was not updated on UI.
I debugged code of RadRichTextEditor of Telerik and the second condition "IsDocumentLoaded" of OnSourcePropertyChanged() has to become "true" but, it's not "true" and I assume that this cause problem as below code.
private async void OnSourcePropertyChanged(RichTextSource richTextSource)
{
if (richTextSource == null)
;
else if (!this.IsDocumentLoaded)
;
else
{
string htmlText = await this.GetHtmlAsync(richTextSource);
this.dispatchHandler.InvokeOnMainThread((Action) (async () =>
{
await this.richTextView.SetHtmlAsync(htmlText);
await this.richTextView.ClearHistoryAsync();
}));
this.dispatchHandler.InvokeOnMainThread((Action) (async () => await this.richTextView.ScrollToPositionAsync(0.0, 0.0)));
}
}
I believe that the data(IsDocumentLoaded) is updated when "document-loaded"message come to RichTextView.
private void OnDocumentLoaded(object sender, EventArgs eventArgs)
{
this.IsDocumentLoaded = true;
this.UpdateDefaultValues();
this.UpdateContentSize();
this.UpdateCommandState();
}
Would you please check this problem and improve it so the bound data can be updated and shown to UI correctly whenever I change the HTML string data?