关于FreeTextBox3编辑器的扩充功能实现步骤
在学习FreeTextBox3控件时的一点心得记录如下:
1、首先把bin文件夹下的、FreeTextBox3文件夹、emotions文件夹覆盖。
2、将communityserver.config中markup标签段更新为:
<MarkUp>
<globalAttributes>
<class enable = "true" />
<align enable = "true" />
<id enable = "true" />
<valign enable="true" />
<style enable="true" />
</globalAttributes>
<html>
<h1 />
<h2 />
<h3 />
<h4 />
<h5 />
<h6 />
<h7 />
<strong />
<em />
<u />
<b />
<i />
<strike />
<sub />
<sup />
<font size = "true" color = "true" face = "true" />
<blockquote dir = "true" />
<ul />
<ol />
<li />
<p dir = "true" />
<address />
<div />
<hr />
<br />
<a id = "true" href = "true" title = "true" name = "true" target= "true" rel = "true" />
<span />
<img src="true" alt="true" title="true" height="true" width="true" hspace="true" vspace="true" border="true" />
<table border="true" cellpadding="true" cellspacing="true" bgcolor="true" width="true" background="true" />
<th />
<td rowspan = "true" colspan = "true" bgcolor="true" nowrap="true" />
<tr />
<pre />
<code />
<xmp />
<lecut />
<center />
<object id="true" width="true" height="true" classid="true" codebase="true" align="true" border="true" standby="true" type="true" />
<param name="true" value="true" />
<embed src="true" align="true" border="true" width="true" height="true" type="true" pluginspage="true" name="true" showcontrols="true" showpositioncontrols="true" showaudiocontrols="true" showtracker="true" showdisplay="true" showstatusbar="true" autosize="true" showgotobar="true" showcaptioning="true" autostart="true" autorewind="true" animationatstart="true" transparentatstart="true" allowscan="true" enablecontextmenu="true" clicktoplay="true" invokeurls="true" defaultframe="true" />
</html>
</MarkUp>
3、将 communityserver.config 中 CSModules 里的 "ForumSourceCode" 改为:
<add name = "ForumSourceCode" type="Telligent.FreeTextBoxWraper.CodeHighlightingModule, Telligent.FreeTextBoxWraper" />
4、如果要加入"话题选择"请在“View-CreateEditPost.ascx”加入如下代码:
<div class="CommonFormField">
<select name=font onchange="DoTitle(this.options[this.selectedIndex].value)">
<OPTION selected value="">选择话题</OPTION>
<option value=[原创]>[原创]</option>
<option value=[转帖]>[转帖]</option>
<option value=[灌水]>[灌水]</option>
<option value=[讨论]>[讨论]</option>
<option value=[求助]>[求助]</option>
<option value=[推荐]>[推荐]</option>
<option value=[公告]>[公告]</option>
<option value=[注意]>[注意]</option>
<option value=[贴图]>[贴图]</option>
<option value=[建议]>[建议]</option>
<option value=[下载]>[下载]</option>
<option value=[分享]>[分享]</option>
</select>
<asp:textbox autocomplete="off" id="PostSubject" runat="server" style="width:80%;" />
<SCRIPT LANGUAGE="JavaScript">
<!--
function DoTitle(addTitle) {
var revisedTitle;
var currentTitle = document.getElementById("<%= PostSubject.ClientID%>").value;
revisedTitle = addTitle+currentTitle;
document.getElementById("<%= PostSubject.ClientID%>").value=revisedTitle;
document.getElementById("<%= PostSubject.ClientID%>").focus();
return;
}
//-->
</SCRIPT>
</div>
5、还有emoticons.aspx的更改!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· DeepSeek如何颠覆传统软件测试?测试工程师会被淘汰吗?