# HG changeset patch # User Aurelien Campeas # Date 1251722268 -7200 # Node ID e3e5ab4b987abd202d6b5d774faf865633b9fa17 # Parent 19180dc9d1b19d871871498e68b67fb61087efa0# Parent ea967a4f6ccbcefefb3876590a9ce133bfb255e2 merge diff -r 19180dc9d1b1 -r e3e5ab4b987a web/data/cubicweb.ajax.js --- a/web/data/cubicweb.ajax.js Mon Aug 31 14:27:28 2009 +0200 +++ b/web/data/cubicweb.ajax.js Mon Aug 31 14:37:48 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;