From e764ca9e166d4d3b897342bc18b707fec11ffc78 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Tue, 11 Apr 2006 07:08:23 +0000 Subject: [PATCH] Jay Bertrandts patch for fixup multi-spawened WYSIWYG controls. HUGE thanks! --- include/functions_entries_admin.inc.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/functions_entries_admin.inc.php b/include/functions_entries_admin.inc.php index 4effa9f..b47438f 100644 --- a/include/functions_entries_admin.inc.php +++ b/include/functions_entries_admin.inc.php @@ -518,10 +518,18 @@ function serendipity_emit_htmlarea_code($item, $jsname, $spawnMulti = false) { // Thanks to Randall for pointing this out! // HTMLArea.loadPlugin("SpellChecker"); // [SPELLCHECK] + + // when spawning multiple editors at once, keep track of instances in this array + var htmlarea_editors = new Array(); + var editor = null; var config = null; + function Spawn() { - var editor = new HTMLArea(""); - var config = editor.config; + editor = new HTMLArea(""); + + htmlarea_editors[""] = editor; + + config = editor.config; config.registerButton('image_selector', '', 'htmlarea/images/ed_s9yimage.gif', false, function(editor, id) { window.open('serendipity_admin_image_selector.php?serendipity[textarea]=', 'ImageSel', 'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1'); -- 2.39.5