📄 weblogformattingmodule.cs
字号:
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
// Copyright (c) Telligent Systems Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
using System.Xml;
using CommunityServer.Components;
namespace CommunityServer.Blogs.Components
{
/// <summary>
/// Summary description for WeblogFormattingModule.
/// </summary>
public class WeblogFormattingModule : ICSModule
{
public WeblogFormattingModule()
{
//
// TODO: Add constructor logic here
//
}
public void Init(CSApplication csa, XmlNode node)
{
csa.PreSectionUpdate +=new CSSectionEventHandler(csa_PreSectionUpdate);
}
private void csa_PreSectionUpdate(Section section, CSEventArgs e)
{
if(e.ApplicationType == ApplicationType.Weblog && (e.State == ObjectState.Create || e.State == ObjectState.Update))
{
Weblog w = section as Weblog;
w.Description = HtmlScrubber.Clean(w.Description,true,true);
w.Name = HtmlScrubber.Clean(w.Name,true,true);
w.News = HtmlScrubber.Clean(w.News,true,true);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -