Home > php教程 > PHP源码 > 新浪编辑器的调用

新浪编辑器的调用

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-08 17:30:25
Original
1214 people have browsed it
<script>ec(2);</script>

require_once('cls.small_editor.php');
$obj = new SmallEditor();
$obj -> setEditor($e_form_name,$e_form_value,$width,$height);

        /*===========================================================
        = 版权协议:
        =        GPL (The GNU GENERAL PUBLIC LICENSE Version 2, June 1991)
        =------------------------------------------------------------
        = 文件名称:cls.small_editor.php
        = 摘    要:轻量级HTML编辑器 for PHP5
        = 版    本:1.0
        =------------------------------------------------------------
        = Script Written By phpwms项目组
        = 最后更新:xinge
        = 最后日期:2008-07-24
        ============================================================*/
        
        !defined('IN_SYS') and die('Hacking attempt');

        class SmallEditor {
               
                public $editor_dir = 'editor/SMALLeditor/';
               
                public function  __construct() {
                        global $root_dir;
                        $this -> editor_dir = $root_dir.$this -> editor_dir;
                        ob_start(array($this,'callBack'));
                }

                // 初始化
                private function editorInit() {
                        $str  = ''."\n";
                        $str .= ''."\n";
                        $str .= ''."\n";
                        $str .= ''."\n";
                        return $str;
                }

                // 回调替换
                public function callBack($buffer) {
                        return (str_replace(array('','',''),$this -> editorInit().'', $buffer));
                }

                public function setEditor($e_form_name = 'my_text_area',$e_form_value = '',$e_toolbar = 'AdminMode',$height='',$width = '100%') {
                        !$height and $height = 230;
                        !strstr($height,'%') and $height = $height.'px';
                        !strstr($width,'%')  and $width  = $width.'px';
                        return                
               
               
EOF;
                }
        }
?>新浪编辑器的调用

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template