<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; use ModStart\Core\Util\HtmlUtil; class RichHtml extends AbstractField { protected $listable = false; protected static $js = array('asset/common/editor.js'); protected function setup() { $this->addVariables(array('editorMode' => 'default', 'server' => modstart_admin_url('data/ueditor'), 'htmlFilter' => true, 'editorOption' => null)); } public function editorMode($bJtEU) { $this->addVariables(array('editorMode' => $bJtEU)); return $this; } public function htmlFilter($z8oGH = true) { $this->addVariables(array('htmlFilter' => $z8oGH)); return $this; } public function editorOption($Gttsd = true) { $this->addVariables(array('editorOption' => $Gttsd)); return $this; } public function server($P6Nu0) { $this->addVariables(array('server' => $P6Nu0)); return $this; } public function prepareInput($Gttsd, $ItKj5) { if ($this->variables['htmlFilter']) { $Gttsd = HtmlUtil::filter($Gttsd); } return $Gttsd; } }