The forum operates in read-only mode. Please head to StackOverflow for support.
if(CKEDITOR.instances['wysiwygeditor']) { CKEDITOR.instances['wysiwygeditor'].destroy(true); } CKEDITOR.replace( 'wysiwygeditor');
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help. Visit the new CKEditor SDK for samples showcasing editor features to try out and download!
public function editor($name, $value = "", $config = array(), $events = array()) { $attr = ""; foreach ($this->textareaAttributes as $key => $val) { $attr.= " " . $key . '="' . str_replace('"', '"', $val) . '"'; } $out = "<textarea name=\"" . $name . "\"" . $attr . ">" . htmlspecialchars($value) . "</textarea>\n"; if (!$this->initialized) { $out .= $this->init(); } $_config = $this->configSettings($config, $events); $txtHash = md5(time() . rand(0,1000)); $js = $this->returnGlobalEvents(); $js .= "if (!CKEDITOR.dws".$txtHash.") {"; $js .= "CKEDITOR.dws".$txtHash."=true;"; $js .= "if (CKEDITOR.instances['".$name."']) { try{ CKEDITOR.instances['".$name."'].destroy(true); delete CKEDITOR.instances['".$name."']; } catch(e) {}; }"; if (!empty($_config)) $js .= "setTimeout('CKEDITOR.replace(\"".$name."\", ".$this->jsEncode($_config).");',0);"; else $js .= "setTimeout('CKEDITOR.replace(\"".$name."\");',0);"; $js .= "setTimeout(\"delete CKEDITOR.dws".$txtHash.";\",2000);"; $js .= "}"; $out .= $this->script($js); if (!$this->returnOutput) { print $out; $out = ""; } return $out; }
$js .= "if (!CKEDITOR.dws".$txtHash.") {";
Re: Safari Jquery Ajax Destroy and Replace Bug
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!
Re: Safari Jquery Ajax Destroy and Replace Bug
Re: Safari Jquery Ajax Destroy and Replace Bug
public function editor($name, $value = "", $config = array(), $events = array()) { $attr = ""; foreach ($this->textareaAttributes as $key => $val) { $attr.= " " . $key . '="' . str_replace('"', '"', $val) . '"'; } $out = "<textarea name=\"" . $name . "\"" . $attr . ">" . htmlspecialchars($value) . "</textarea>\n"; if (!$this->initialized) { $out .= $this->init(); } $_config = $this->configSettings($config, $events); $txtHash = md5(time() . rand(0,1000)); $js = $this->returnGlobalEvents(); $js .= "if (!CKEDITOR.dws".$txtHash.") {"; $js .= "CKEDITOR.dws".$txtHash."=true;"; $js .= "if (CKEDITOR.instances['".$name."']) { try{ CKEDITOR.instances['".$name."'].destroy(true); delete CKEDITOR.instances['".$name."']; } catch(e) {}; }"; if (!empty($_config)) $js .= "setTimeout('CKEDITOR.replace(\"".$name."\", ".$this->jsEncode($_config).");',0);"; else $js .= "setTimeout('CKEDITOR.replace(\"".$name."\");',0);"; $js .= "setTimeout(\"delete CKEDITOR.dws".$txtHash.";\",2000);"; $js .= "}"; $out .= $this->script($js); if (!$this->returnOutput) { print $out; $out = ""; } return $out; }$js .= "if (!CKEDITOR.dws".$txtHash.") {";http://dev.ckeditor.com/ticket/8641