Fix: kill instance if exist

This commit is contained in:
Regis Houssin 2011-06-20 17:19:12 +00:00
parent 8369e7fbe2
commit 8ccbe4c7dd

View File

@ -164,6 +164,9 @@ class DolEditor
$out.= '<script type="text/javascript">
jQuery(document).ready(function () {
if (CKEDITOR.instances[\''.$this->htmlname.'\']) {
CKEDITOR.remove(CKEDITOR.instances[\''.$this->htmlname.'\']);
}
CKEDITOR.replace(\''.$this->htmlname.'\',
{
customConfig : \''.dol_buildpath('/theme/'.$conf->theme.'/ckeditor/config.js',1).'\',