$(document).ready(function() {
  // setup html editor
  var imgUploadHtml = $('#html-editor-image-upload-tab').html();

  if (imgUploadHtml) {
    var options = {
        "html": true,
      customTemplates: {
        image: function(locale) {
          return imgUploadHtml;
        }
      }
    };
    $('textarea.html-editor').wysihtml5(options);
  } else {
    $("textarea.html-editor").each(function(){$(this).wysihtml5();});
  }
});

@@ -111,16 +111,31 @@
 .html();
+%0A  var handler;
 %0A%0A  if (
@@ -317,32 +317,37 @@
     
-$('textarea.html-editor'
+handler = function() %7B $(this
 ).wy
@@ -363,16 +363,19 @@
 ptions);
+ %7D;
 %0A  %7D els
@@ -386,11 +386,64 @@
     
-$(%22
+handler = function() %7B $(this).wysihtml5(); %7D;%0A  %7D%0A  $('
 text
@@ -462,54 +462,137 @@
 itor
-%22
+'
 ).each(
-function()%7B$(this).wysihtml5();%7D
+handler);%0A  $(document).on('DOMNodeInserted', function(e) %7B%0A      $('textarea.html-editor', e.target).each(handler
 );%0A  %7D
+)
 %0A%7D);

Make the HTML Editor component monitor every node insertion for HTML WYSIWYG widgets. This is so that we can insert new editors at runtime and they will automatically be enabled.