formeditor.php
来自「php 开发的内容管理系统」· PHP 代码 · 共 48 行
PHP
48 行
<?php
/**
* Editor framework for XOOPS
*
* @copyright The XOOPS project http://www.xoops.org/
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @author Taiwen Jiang (phppp or D.J.) <php_pp@hotmail.com>
* @since 1.00
* @version $Id$
* @package xoopseditor
*/
class XoopsFormEditor extends XoopsFormTextArea
{
var $allowed_editors = array();
var $configs = array();
var $OnFailure;
var $name;
var $nohtml;
/**
* Constructor
*
* @param string $caption Caption
* @param string $name "name" attribute
* @param string $value Initial text
* @param array $configs configures
* @param bool $noHtml use non-WYSIWYG eitor onfailure
* @param string $OnFailure editor to be used if current one failed
*/
function XoopsFormEditor($caption, $name, $editor_configs = null, $nohtml = false, $OnFailure = "")
{
require_once XOOPS_ROOT_PATH."/class/xoopseditor/xoopseditor.php";
$this->XoopsFormTextArea($caption, $editor_configs["name"]);
$this->configs = $editor_configs;
$this->name = $name;
$this->OnFailure= $OnFailure;
$this->nohtml = $nohtml;
}
function render()
{
$editor_handler = XoopsEditorHandler::getInstance();
$this->editor =& $editor_handler->get($this->name, $this->configs, $this->nohtml, $this->OnFailure);
return $this->editor->render();
}
}
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?