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

新浪编辑器的调用

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
풀어 주다: 2016-06-08 17:30:25
원래의
1203명이 탐색했습니다.
<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;
                }
        }
?>新浪编辑器的调用

관련 라벨:
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 추천
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿