zoukankan      html  css  js  c++  java
  • lotus domino下使用FCKeditor

    lotus domino下使用FCKeditor,有两种插入方法。

    第一种(比较推荐的方法):

    HTML首页内容里面加入
    "<script type='text/javascript' src='/fck/fckeditor.js'></script>"
    //注意路径别写错,FCK编辑器那个文件夹在哪里就写哪里,比如domino里面我把文件夹命名为fck,放入data/domino/html里面,所以这样写。


    表单或页面里面用内置HTML写入

    <script type ="text/javascript">
    var oFCKeditor = new FCKeditor("FCKeditor1");
    oFCKeditor.BasePath =  '/fck/'; //这里同上,设置FCK编辑器的目录
    oFCKeditor.Create();
    </script>


    第二种方法(替换Textarea实现):

    HTML首页内容里面加入
    "<script type='text/javascript' src='/fck/fckeditor.js'></script>"
    //注意路径别写错,FCK编辑器那个文件夹在哪里就写哪里,比如domino里面我把文件夹命名为fck,放入data/domino/html里面,所以这样写。


    JS Header 里面写入

    window.onload = function()
    {
    var sBasePath = '/fck/'; //这里修改为你网站的fck编辑器文件夹的相对路径
    var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
    oFCKeditor.BasePath = sBasePath ;
    oFCKeditor.ReplaceTextarea();
    }


    表单或页面里面用内置HTML写入

    <textarea name="FCKeditor1" rows="10" cols="80" style=" 100%; height: 200px"> </textarea>


    另附两个获取FCK文本框内容的方法(EditorName传入FCKeditor的名字,比如上面的名字是FCKeditor1)

    // 获取编辑器HTML内容
    function getEditorHTMLContents(EditorName) {
    var oEditor = FCKeditorAPI.GetInstance(EditorName);
    return(oEditor.GetXHTML(true));
    }

    // 获取编辑器中文字内容
    function getEditorTextContents(EditorName) {
    var oEditor = FCKeditorAPI.GetInstance(EditorName);
    return(oEditor.EditorDocument.body.innerText);
    }
  • 相关阅读:
    访问通讯录并设置联络人信息
    创建提醒事项
    iOS 高仿:花田小憩3.0.1
    iOS 手机淘宝加入购物车动画分析
    VTMagic 的使用介绍
    React Native 从入门到原理
    用户数据攻略-获取日历事件
    键盘收回方法
    提高jQuery执行效率需要注意几点
    你应该了解的jquery 验证框架
  • 原文地址:https://www.cnblogs.com/hannover/p/2122499.html
Copyright © 2011-2022 走看看