diff --git a/src/Element/WebformHtmlEditor.php b/src/Element/WebformHtmlEditor.php
index 9adeda16..57bd6783 100644
--- a/src/Element/WebformHtmlEditor.php
+++ b/src/Element/WebformHtmlEditor.php
@@ -72,8 +72,9 @@ class WebformHtmlEditor extends FormElement {
       $element['value']['#required'] = $element['#required'];
     }
 
-    // If HTML disabled return simple CodeMirror HTML editor.
-    $disabled = \Drupal::config('webform.settings')->get('html_editor.disabled') ?: $element['#format'];
+    // If HTML disabled and no #format is specified return simple CodeMirror
+    // HTML editor.
+    $disabled = \Drupal::config('webform.settings')->get('html_editor.disabled') ?: empty($element['#format']);
     if ($disabled) {
       $element['value'] += [
         '#type' => 'webform_codemirror',
@@ -83,8 +84,9 @@ class WebformHtmlEditor extends FormElement {
       return $element;
     }
 
-    // If #context and format is defined return 'text_format' element.
-    $format = \Drupal::config('webform.settings')->get('html_editor.format') ?: $element['#format'];
+    // If #format or 'webform.settings.html_editor.format' is defined return
+    // a 'text_format' element.
+    $format = $element['#format'] ?: \Drupal::config('webform.settings')->get('html_editor.format');
     if ($format) {
       $element['value'] += [
         '#type' => 'text_format',
diff --git a/src/Form/WebformHandlerFormBase.php b/src/Form/WebformHandlerFormBase.php
index 1d974b95..8122a302 100644
--- a/src/Form/WebformHandlerFormBase.php
+++ b/src/Form/WebformHandlerFormBase.php
@@ -84,6 +84,12 @@ abstract class WebformHandlerFormBase extends FormBase {
       }
     }
 
+    // Add meta data to webform handler form.
+    // This information makes it a little easier to alter a handler's form.
+    $form['#webform_id']  = $this->webform->id();
+    $form['#webform_handler_id'] = $this->webformHandler->getHandlerId();
+    $form['#webform_handler_plugin_id'] = $this->webformHandler->getPluginId();
+
     $request = $this->getRequest();
 
     $form['description'] = [
