<?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($TaJ4B) { $this->addVariables(array('editorMode' => $TaJ4B)); return $this; } public function htmlFilter($XYn5i = true) { $this->addVariables(array('htmlFilter' => $XYn5i)); return $this; } public function editorOption($HDpl6 = true) { $this->addVariables(array('editorOption' => $HDpl6)); return $this; } public function server($YSNPl) { $this->addVariables(array('server' => $YSNPl)); return $this; } public function prepareInput($HDpl6, $Ud6x8) { if ($this->variables['htmlFilter']) { $HDpl6 = HtmlUtil::filter($HDpl6); } return $HDpl6; } }