Code Duplication    Length = 19-19 lines in 2 locations

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

@@ 7405-7423 (lines=19) @@
7402
      });
7403
      return value;
7404
    };
7405
    var createFontSizeListBoxChangeHandler = function (editor, items) {
7406
      return function () {
7407
        var self = this;
7408
        editor.on('init nodeChange', function (e) {
7409
          var px, pt, precision, match;
7410
          px = editor.queryCommandValue('FontSize');
7411
          if (px) {
7412
            for (precision = 3; !match && precision >= 0; precision--) {
7413
              pt = toPt(px, precision);
7414
              match = findMatchingValue$1(items, pt, px);
7415
            }
7416
          }
7417
          self.value(match ? match : null);
7418
          if (!match) {
7419
            self.text(pt);
7420
          }
7421
        });
7422
      };
7423
    };
7424
    var getFontSizeItems = function (editor) {
7425
      var defaultFontsizeFormats = '8pt 10pt 12pt 14pt 18pt 24pt 36pt';
7426
      var fontsizeFormats = editor.settings.fontsize_formats || defaultFontsizeFormats;

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

@@ 7247-7265 (lines=19) @@
7244
      });
7245
      return value;
7246
    };
7247
    var createFontSizeListBoxChangeHandler = function (editor, items) {
7248
      return function () {
7249
        var self = this;
7250
        editor.on('init nodeChange', function (e) {
7251
          var px, pt, precision, match;
7252
          px = editor.queryCommandValue('FontSize');
7253
          if (px) {
7254
            for (precision = 3; !match && precision >= 0; precision--) {
7255
              pt = toPt(px, precision);
7256
              match = findMatchingValue$1(items, pt, px);
7257
            }
7258
          }
7259
          self.value(match ? match : null);
7260
          if (!match) {
7261
            self.text(pt);
7262
          }
7263
        });
7264
      };
7265
    };
7266
    var getFontSizeItems = function (editor) {
7267
      var defaultFontsizeFormats = '8pt 10pt 12pt 14pt 18pt 24pt 36pt';
7268
      var fontsizeFormats = editor.settings.fontsize_formats || defaultFontsizeFormats;