CoreFiles by mySites.guru
plugin.js52 lines, 1,345 bytes, from Joomla_4.0.6-Stable-Full_Package.zip
Raw History Compare with 4.0.5
md5
e2b2a6d2cabcd38b9d4ed9c6dd5a4a46
sha1
12279a87eeaacbc5b1eef9a08eec8f46a40c16a9
sha256
d07ca419dd69ec31bf8d68ec15d7d1c04e23c22b1b1525b1a29117d5bb9b3eda
/**
 * Copyright (c) Tiny Technologies, Inc. All rights reserved.
 * Licensed under the LGPL or a commercial license.
 * For LGPL see License.txt in the project root for license information.
 * For commercial licenses see https://www.tiny.cloud/
 *
 * Version: 5.10.2 (2021-11-17)
 */
(function () {
    'use strict';

    var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');

    var global = tinymce.util.Tools.resolve('tinymce.Env');

    var register$1 = function (editor) {
      editor.addCommand('mcePrint', function () {
        if (global.browser.isIE()) {
          editor.getDoc().execCommand('print', false, null);
        } else {
          editor.getWin().print();
        }
      });
    };

    var register = function (editor) {
      var onAction = function () {
        return editor.execCommand('mcePrint');
      };
      editor.ui.registry.addButton('print', {
        icon: 'print',
        tooltip: 'Print',
        onAction: onAction
      });
      editor.ui.registry.addMenuItem('print', {
        text: 'Print...',
        icon: 'print',
        onAction: onAction
      });
    };

    function Plugin () {
      global$1.add('print', function (editor) {
        register$1(editor);
        register(editor);
        editor.addShortcut('Meta+P', '', 'mcePrint');
      });
    }

    Plugin();

}());

The same content is in 18 releases, Joomla 4.0.5-rc1 to 4.1.0. See them all, or every version of this file.