1
<script language="javascript">
2
// 创建相当于<textarea name="editor" style="width:100%;"></textarea>的对象
3
// 参数'editor'是产生的textarea的name值
4
var oFCKeditor = new FCKeditor('editor') ;
5
oFCKeditor.BasePath = "/SightSpots/JavaScripts/FCKeditor/" ; // 必须指定
6
oFCKeditor.Config["BaseHref"]=""; // 保证相对路径相对于上下文
7
oFCKeditor.Config["DefaultLanguage"]="zh-cn"; // 默认语言
8
oFCKeditor.Width = "100%"; // 编辑器宽度
9
oFCKeditor.Height = "300"; // 编辑器高度
10
oFCKeditor.Create() ;
11
</script>

2

3

4

5

6

7

8

9

10

11

1
<script language="javascript" src="/JavaScripts/FCKeditor/fckeditor.js"></script>
2
3
src="" 是该js的路径

2

3

【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步