--- a/web/data/cubicweb.ajax.js Mon Aug 31 09:58:15 2009 +0200
+++ b/web/data/cubicweb.ajax.js Mon Aug 31 14:37:16 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;