Esempio n. 1
0
 public function init()
 {
     parent::init();
     $view = $this->getView();
     UeditorAsset::register($view);
     $view->registerJs($this->getJsString(), 3);
 }
Esempio n. 2
0
 public function init()
 {
     parent::init();
     $id = $this->getRandomId();
     $view = $this->getView();
     UeditorAsset::register($view);
     $js = [];
     if ($this->var_name) {
         $js[] = "window.{$this->var_name}=";
     }
     $js[] = "UE.getEditor('{$id}',{emotionLocalization:true";
     if ($this->action) {
         $js[] = ",serverUrl:'{$this->action}'";
     }
     if ($this->toolbars) {
         $js[] = ",toolbars:[[{$this->toolbars}]]";
     }
     $js[] = '});';
     $view->registerJs(implode('', $js));
 }