zoukankan      html  css  js  c++  java
  • FCKeditor 编辑器

    第一种 使用js 调用 fck
    在当前的的html页面引入fckeditor目录下的fckeditor.js 这个主要是看你的文件是怎么放置的了
    默认的fckeditor.js 是放在fckeditor目录下的
    例如这么引入<script type="text/javascript" src="./fckeditor/fckeditor.js"></script>
    我们这个时候需要加入这断代码了
    <script type="text/javascript">
    //这里其实是获得fckeditor 文件所在的地址
     //var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('Public'));
    //这里是我自己设定的地址你也可以自己设定
    var sBasePath = "/fckeditor/";
    //这里面的值表示的是textarea 的name 值。 可以自己设定
    var oFCKeditor = new FCKeditor( 'content' ) ;
    //获取地址
     oFCKeditor.BasePath = sBasePath ;
    //设置高度
     oFCKeditor.Height = 300 ;
    //设置宽度
     oFCKeditor.Width= 300 ;
    //这个表示里面的value 值
     oFCKeditor.Value = '' ;
    //最后一步创建
     oFCKeditor.Create() ;
    </script>
     
    第二种 使用php 调用 fck
    在当前页面要引入  include("./fckeditor.php") 这个路径根据这个php 文件所在的路径自己设置
    加上这断php代码
       $sBasePath = $_SERVER['PHP_SELF'] ;
       $sBasePath = substr( $sBasePath, 0, strpos( $sBasePath, "_samples" ) ) ;
       $oFCKeditor = new FCKeditor('FCKeditor1') ;//这里的名字是textarea 的那么值
       $oFCKeditor->BasePath = $sBasePath ;
       $oFCKeditor->Width = '800px';
       $oFCKeditor->Height = '300px';
       $oFCKeditor->Create() ;
     
    文件上传的时候需要设置的话 找到
    editor\filemanager\connectors\php 中config 的文件可以在里面修改相关信息参数

    你们懂的
     
    抱歉:关于js 的文件上传怎么改的我也没摸索出来 希望知道的可以给我留言 谢谢

    备注:其实fck 里面有很多example 的大家可以参考下的 具体根据自己的需求来修改的

  • 相关阅读:
    VS2010/MFC编程入门之三(VS2010应用程序工程中文件的组成结构)
    VS2010/MFC编程入门之二(利用MFC向导生成单文档应用程序框架)
    VS2010/MFC编程入门之一(VS2010与MSDN安装过程图解)
    Getmemory问题
    计算后缀表达式
    0-1背包问题
    不抛异常的swap函数
    输出n*n矩阵
    字符串全排列输出
    判断主机字节
  • 原文地址:https://www.cnblogs.com/wlgaojin/p/2673157.html
Copyright © 2011-2022 走看看