forked from jegelstaff/formulize
/
Editor.php
56 lines (52 loc) · 1.64 KB
/
Editor.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* Creates a form editor object
*
* @copyright http://www.xoops.org/ The XOOPS Project
* @copyright XOOPS_copyrights.txt
* @copyright http://www.impresscms.org/ The ImpressCMS Project
* @license LICENSE.txt
* @package XoopsForms
* @since XOOPS
* @author http://www.xoops.org The XOOPS Project
* @author modified by UnderDog <underdog@impresscms.org>
* @version $Id: Editor.php 20504 2010-12-08 04:40:32Z skenow $
*/
if (!defined('ICMS_ROOT_PATH')) die("ImpressCMS root path not defined");
/**
* XoopsEditor hanlder
*
* @author D.J.
* @copyright copyright (c) 2000-2005 XOOPS.org
*
* @package kernel
* @subpackage form
* @todo To be removed as this is not used anywhere in the core
*/
class icms_form_elements_Editor extends icms_form_elements_Textarea {
var $editor;
/**
* 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 icms_form_elements_Editor($caption, $name, $editor_configs = null, $noHtml=false, $OnFailure = "")
{
parent::__construct($caption, $editor_configs["name"]);
$editor_handler = icms_plugins_EditorHandler::getInstance();
$this->editor =& $editor_handler->get($name, $editor_configs, $noHtml, $OnFailure);
}
/**
* Renders the editor
* @return string the constructed html string for the editor
*/
function render()
{
return $this->editor->render();
}
}