fix strange behavior after inserting a substitution, #38803, fallout from #24331
[freeside.git] / httemplate / elements / htmlarea.html
index c98993d..0ba4177 100644 (file)
@@ -20,7 +20,8 @@ Example:
 
 <SCRIPT TYPE="text/javascript">
 
-  CKEDITOR.replace('<% $opt{'field'} %>',
+  var <% $opt{'field'} %>_editor =
+    CKEDITOR.replace('<% $opt{'field'} %>',
                    <% encode_json($config) %>
   );