/** * Re-renders the CKEditor instance. In most cases there is no need to call manually. * * @param mixed $race Whether to render with race condition safeguard. */ function Refresh($race = false) { if ($this->TextHolder->ShowStatus == Component::Shown) { ClientScript::Queue($this->TextHolder, "CKEDITOR.instances.{$this->TextHolder}.destroy"); if ($race) { ClientScript::RaceQueue($this->TextHolder, 'CKEDITOR.status == "loaded"', 'CKEDITOR.replace', array($this->TextHolder->Id, $this->Config), true, Priority::Low); } else { ClientScript::Queue($this->TextHolder, 'CKEDITOR.replace', array($this->TextHolder->Id, $this->Config), true, Priority::Low); } } }
/** * Re-renders the tinyMCE instance. In most cases there is no need to call manually. * * @param mixed $race Whether to render with race condition safeguard. */ function Refresh($race = false) { if($this->ShowStatus == Component::Shown) { ClientScript::Queue($this,"tinymce.get('$this').destroy"); $args = ClientScript::ClientFormat($this->Config); ClientScript::RaceQueue($this, 'tinymce', "var e=new tinymce.Editor('$this', $args);e.render();"); } }
function Leave() { // if($this->ShowStatus == Component::Shown) ClientScript::Queue($this,"tinymce.get('$this').remove"); }