33 lines
825 B
Plaintext
33 lines
825 B
Plaintext
@using System.ComponentModel
|
|
@using Oqtane.Shared
|
|
@inject SiteState SiteState
|
|
|
|
@((MarkupString)content)
|
|
|
|
@code {
|
|
private string content = "";
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
((INotifyPropertyChanged)SiteState.Properties).PropertyChanged += PropertyChanged;
|
|
}
|
|
|
|
private void PropertyChanged(object sender, PropertyChangedEventArgs e)
|
|
{
|
|
switch (e.PropertyName)
|
|
{
|
|
case "BodyContent":
|
|
if (content != SiteState.Properties.BodyContent)
|
|
{
|
|
content = SiteState.Properties.BodyContent;
|
|
StateHasChanged();
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
((INotifyPropertyChanged)SiteState.Properties).PropertyChanged -= PropertyChanged;
|
|
}
|
|
} |