Code Duplication    Length = 15-15 lines in 2 locations

public/js/tinymce/themes/inlite/theme.js 1 location

@@ 8416-8430 (lines=15) @@
8413
        this.classes.remove('success');
8414
        this.classes.add(level);
8415
      },
8416
      renderHtml: function () {
8417
        var self = this;
8418
        var targetCtrl, forName, forId = self.settings.forId;
8419
        var text = self.settings.html ? self.settings.html : self.encode(self.state.get('text'));
8420
        if (!forId && (forName = self.settings.forName)) {
8421
          targetCtrl = self.getRoot().find('#' + forName)[0];
8422
          if (targetCtrl) {
8423
            forId = targetCtrl._id;
8424
          }
8425
        }
8426
        if (forId) {
8427
          return '<label id="' + self._id + '" class="' + self.classes + '"' + (forId ? ' for="' + forId + '"' : '') + '>' + text + '</label>';
8428
        }
8429
        return '<span id="' + self._id + '" class="' + self.classes + '">' + text + '</span>';
8430
      },
8431
      bindStates: function () {
8432
        var self = this;
8433
        self.state.on('change:text', function (e) {

public/js/tinymce/themes/modern/theme.js 1 location

@@ 8258-8272 (lines=15) @@
8255
        this.classes.remove('success');
8256
        this.classes.add(level);
8257
      },
8258
      renderHtml: function () {
8259
        var self = this;
8260
        var targetCtrl, forName, forId = self.settings.forId;
8261
        var text = self.settings.html ? self.settings.html : self.encode(self.state.get('text'));
8262
        if (!forId && (forName = self.settings.forName)) {
8263
          targetCtrl = self.getRoot().find('#' + forName)[0];
8264
          if (targetCtrl) {
8265
            forId = targetCtrl._id;
8266
          }
8267
        }
8268
        if (forId) {
8269
          return '<label id="' + self._id + '" class="' + self.classes + '"' + (forId ? ' for="' + forId + '"' : '') + '>' + text + '</label>';
8270
        }
8271
        return '<span id="' + self._id + '" class="' + self.classes + '">' + text + '</span>';
8272
      },
8273
      bindStates: function () {
8274
        var self = this;
8275
        self.state.on('change:text', function (e) {