CKEditor is duplicating a field -
so original problem needed rid of img style attribute on images in ckeditor.
i found code trick:
if (ckeditor.instances['field_id_4']) { ckeditor.remove(ckeditor.instances['field_id_4']); } ckeditor.replace('field_id_4',{ allowedcontent: 'img[!src,alt,width,height]{float};' + 'h1 h2 div' });
but when top condition there.
now see though, ckeditor duplicated...
anyone know how fix this?
you should use editor.destroy()
instead of ckeditor.remove
private method.
something like:
if (ckeditor.instances['field_id_4']) { ckeditor.instances['field_id_4'].destroy(); } ckeditor.replace('field_id_4',{ allowedcontent: 'img[!src,alt,width,height]{float};' + 'h1 h2 div' });
Comments
Post a Comment