Index: openacs-4/packages/xowiki/www/resources/repeat.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/repeat.js,v diff -u -r1.5 -r1.6 --- openacs-4/packages/xowiki/www/resources/repeat.js 3 Sep 2024 15:37:56 -0000 1.5 +++ openacs-4/packages/xowiki/www/resources/repeat.js 18 Sep 2024 14:10:09 -0000 1.6 @@ -313,6 +313,22 @@ } } } + // + // TinyMCE logics, similar to those for CKEditor above: + // for all fields we are going to delete/move, persist + // their value in the form field and remove the richtext + // editor from them. Will be added again by the logics in + // render_input. + // + if (typeof window.tinyMCE != "undefined") { + for (const el of document.querySelectorAll(`[id^='${oldid}'], [id^='${newid}']`)) { + const editor = window.tinyMCE.get(el.id); + // console.log(el.id, editor); + if (!editor) {continue;} + el.innerHTML = editor.getContent(); + editor.remove(); + } + } //console.log(j + ' becomes ' + k + ': ' + divs[k].innerHTML); divs[j].innerHTML = divs[k].innerHTML;