如何将页面上的 CKEDitor 实例设置为始终为富文本编辑器
How to set an instance of CKEDitor on the page to be always Rich Text Editor
我一直致力于在页面上使用 CKEditor 的 DNN 网站(ASP.NET、C#、Visual Basic、Visual Studio 2012 Express for Web)。例子是:
<dnn:TextEditor ID="txtRichBox" runat="server" Width="850" TextRenderMode="Raw" HtmlEncode="False" defaultmode="Rich" height="350" Visible="false" choosemode="true" chooserender="False" />
我希望页面上只有富文本编辑器,而不是基本文本框。我怎样才能做到这一点?预先感谢您的帮助。
使用 JavaScript 将 CKEditor 附加到控件:
<script>
CKEDITOR.replace( 'ID of textbox control' );
</script>
我可以推荐 CKEditor 的文档吗?这是 here.
您不能只发明 choosemode
和 chooserender
等属性并期望它起作用。编辑有 limited number of properties.
最简单的方法是用 CSS 隐藏单选按钮 Basic Text Box
和 Rich Text Editor
,这样用户就无法在它们之间切换。默认情况下加载编辑器,而不是底层的基本文本框。
<style>
.dnnTextPanelView {
display: none;
}
</style>
我一直致力于在页面上使用 CKEditor 的 DNN 网站(ASP.NET、C#、Visual Basic、Visual Studio 2012 Express for Web)。例子是:
<dnn:TextEditor ID="txtRichBox" runat="server" Width="850" TextRenderMode="Raw" HtmlEncode="False" defaultmode="Rich" height="350" Visible="false" choosemode="true" chooserender="False" />
我希望页面上只有富文本编辑器,而不是基本文本框。我怎样才能做到这一点?预先感谢您的帮助。
使用 JavaScript 将 CKEditor 附加到控件:
<script>
CKEDITOR.replace( 'ID of textbox control' );
</script>
我可以推荐 CKEditor 的文档吗?这是 here.
您不能只发明 choosemode
和 chooserender
等属性并期望它起作用。编辑有 limited number of properties.
最简单的方法是用 CSS 隐藏单选按钮 Basic Text Box
和 Rich Text Editor
,这样用户就无法在它们之间切换。默认情况下加载编辑器,而不是底层的基本文本框。
<style>
.dnnTextPanelView {
display: none;
}
</style>