42 public function run() {
44 list($name, $id) = $this->resolveNameID();
46 $this->htmlOptions[
'id'] = $id;
50 if (!array_key_exists(
'style', $this->htmlOptions)) {
51 $this->htmlOptions[
'style'] =
"width:{$this->width};height:{$this->height};";
54 if ($this->hasModel()) {
55 echo CHtml::activeTextArea($this->model, $this->attribute, $this->htmlOptions);
57 echo CHtml::textArea($name, $this->
value, $this->htmlOptions);
69 $booster->registerPackage(
'markdown');
71 $id = $this->htmlOptions[
'id'];
72 $options = CJSON::encode($this->options);
74 Yii::app()->clientScript->registerScript(__CLASS__ .
'#' . $id,
"
75 $('#$id').markdown({$options})
76 ", CClientScript::POS_END