Subversion Repositories oidplus

Rev

Rev 1422 | View as "text/javascript" | Blame | Compare with Previous | Last modification | View Log | RSS feed

  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.9 (2023-11-15)
  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. }());
  46.