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);
    }
  • 相关阅读:
    javascript 基本数据类型
    数据库管理小工具帮助
    CSS3实现32种基本图形
    面试题2:替换空格
    面试题1:二维数组中查找
    图的深度优先和广度优先搜索算法
    Spring+Maven+Dubbo+MyBatis+Linner+Handlebars—Web开发环境搭建
    Spring学习笔记—最小化Spring XML配置
    Spring学习笔记—装配Bean
    Spring学习笔记—Spring之旅
  • 原文地址:https://www.cnblogs.com/hannover/p/2122499.html
Copyright © 2011-2022 走看看