Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / editor / js / editor.formattedTextEditor.js
index 299b60a729c8507c6f6f0fa734ada167f66b692b..3d74aaba0558698aebb997724c5d65470cde50ca 100644 (file)
           break;
 
         case 'active':
-          var textElement = this.$textElement.get(0);
-          var toolbarView = fieldModel.toolbarView;
-          this.textEditor.attachInlineEditor(textElement, this.textFormat, toolbarView.getMainWysiwygToolgroupId(), toolbarView.getFloatedWysiwygToolgroupId());
-
-          this.textEditor.onChange(textElement, function (htmlText) {
-            editorModel.set('currentValue', htmlText);
-            fieldModel.set('state', 'changed');
-          });
-          break;
+          {
+            var textElement = this.$textElement.get(0);
+            var toolbarView = fieldModel.toolbarView;
+            this.textEditor.attachInlineEditor(textElement, this.textFormat, toolbarView.getMainWysiwygToolgroupId(), toolbarView.getFloatedWysiwygToolgroupId());
+
+            this.textEditor.onChange(textElement, function (htmlText) {
+              editorModel.set('currentValue', htmlText);
+              fieldModel.set('state', 'changed');
+            });
+            break;
+          }
 
         case 'changed':
           break;