# HG changeset patch # User Sylvain Thénault # Date 1251730140 -7200 # Node ID f77dd366544f3d395bb5b49ab29f1f10ea9abb66 # Parent a8e901fc44579d1da9490a4c0456a0ba46291a52# Parent e3e5ab4b987abd202d6b5d774faf865633b9fa17 merge diff -r a8e901fc4457 -r f77dd366544f web/data/cubicweb.ajax.js --- a/web/data/cubicweb.ajax.js Mon Aug 31 16:48:53 2009 +0200 +++ b/web/data/cubicweb.ajax.js Mon Aug 31 16:49:00 2009 +0200 @@ -51,7 +51,7 @@ } // find textareas and wrap them if there are some if (typeof(FCKeditor) != 'undefined') { - buildWysiwygEditors(node); + buildWysiwygEditors(); } if (typeof initFacetBoxEvents != 'undefined') { initFacetBoxEvents(node); @@ -351,7 +351,10 @@ */ function buildWysiwygEditors(parent) { jQuery('textarea').each(function () { - if (this.getAttribute('cubicweb:type', 'wysiwyg')) { + if (this.getAttribute('cubicweb:type') == 'wysiwyg') { + // mark editor as instanciated, we may be called a number of times + // (see postAjaxLoad) + this.setAttribute('cubicweb:type', 'fckeditor'); if (typeof FCKeditor != "undefined") { var fck = new FCKeditor(this.id); fck.Config['CustomConfigurationsPath'] = fckconfigpath;