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);
    }
  • 相关阅读:
    Android特效专辑(一)——水波纹过渡特效(首页)
    简单整数算术运算
    Python 获取新浪微博的热门话题 (API)
    比真机还快的Android模拟器——Genymotion
    兔子--CheckBox与Radiobutton的差别
    hdu oj 3127 WHUgirls(2009 Asia Wuhan Regional Contest Online)
    python中列表,元组,字符串如何互相转换
    典型LoadRunner脚本
    LoadRunner显示中文乱码的问题
    如何解决paramiko执行与否的问题
  • 原文地址:https://www.cnblogs.com/hannover/p/2122499.html
Copyright © 2011-2022 走看看