[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/media/vendor/tinymce/plugins/hr/ -> plugin.js (source)

   1  /**
   2   * Copyright (c) Tiny Technologies, Inc. All rights reserved.
   3   * Licensed under the LGPL or a commercial license.
   4   * For LGPL see License.txt in the project root for license information.
   5   * For commercial licenses see https://www.tiny.cloud/
   6   *
   7   * Version: 5.10.5 (2022-05-25)
   8   */
   9  (function () {
  10      'use strict';
  11  
  12      var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
  13  
  14      var register$1 = function (editor) {
  15        editor.addCommand('InsertHorizontalRule', function () {
  16          editor.execCommand('mceInsertContent', false, '<hr />');
  17        });
  18      };
  19  
  20      var register = function (editor) {
  21        var onAction = function () {
  22          return editor.execCommand('InsertHorizontalRule');
  23        };
  24        editor.ui.registry.addButton('hr', {
  25          icon: 'horizontal-rule',
  26          tooltip: 'Horizontal line',
  27          onAction: onAction
  28        });
  29        editor.ui.registry.addMenuItem('hr', {
  30          icon: 'horizontal-rule',
  31          text: 'Horizontal line',
  32          onAction: onAction
  33        });
  34      };
  35  
  36      function Plugin () {
  37        global.add('hr', function (editor) {
  38          register$1(editor);
  39          register(editor);
  40        });
  41      }
  42  
  43      Plugin();
  44  
  45  }());


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer