1<?php 2 3namespace dokuwiki\plugin\structsection\types; 4 5use dokuwiki\plugin\struct\types\TraitFilterPrefix; 6use dokuwiki\plugin\struct\types\Wiki; 7 8class Section extends Wiki 9{ 10 use TraitFilterPrefix; 11 12 protected $config = array( 13 'prefix' => '', 14 'postfix' => '', 15 'placeholder' => '', // ToDo: Make translatable 16 'visibility' => [ 17 'ineditor' => true, // removing the inpage-key to prevent early rendering 18 ] 19 ); 20 21 /** 22 * Use a text area for input 23 * 24 * @param string $name 25 * @param string $rawvalue 26 * @param string $htmlID 27 * 28 * @return string 29 */ 30 public function valueEditor($name, $rawvalue, $htmlID) 31 { 32 $rawvalue = formText($rawvalue); 33 $params = array( 34 'name' => $name, 35 'class' => 'struct_' . strtolower($this->getClass()), 36 'id' => $htmlID, 37 'placeholder' => $this->config['placeholder'], 38 ); 39 $attributes = buildAttributes($params, true); 40 41 return "<textarea $attributes>$rawvalue</textarea>"; 42 } 43} 44