Subversion Repositories oidplus

Rev

Rev 1042 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
597 daniel-mar 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
 *
1422 daniel-mar 7
 * Version: 5.10.8 (2023-10-19)
597 daniel-mar 8
 */
9
(function () {
10
    'use strict';
11
 
12
    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
 
637 daniel-mar 14
    var register$1 = function (editor) {
597 daniel-mar 15
      editor.addCommand('InsertHorizontalRule', function () {
16
        editor.execCommand('mceInsertContent', false, '<hr />');
17
      });
18
    };
19
 
637 daniel-mar 20
    var register = function (editor) {
21
      var onAction = function () {
22
        return editor.execCommand('InsertHorizontalRule');
23
      };
597 daniel-mar 24
      editor.ui.registry.addButton('hr', {
25
        icon: 'horizontal-rule',
26
        tooltip: 'Horizontal line',
637 daniel-mar 27
        onAction: onAction
597 daniel-mar 28
      });
29
      editor.ui.registry.addMenuItem('hr', {
30
        icon: 'horizontal-rule',
31
        text: 'Horizontal line',
637 daniel-mar 32
        onAction: onAction
597 daniel-mar 33
      });
34
    };
35
 
36
    function Plugin () {
37
      global.add('hr', function (editor) {
637 daniel-mar 38
        register$1(editor);
597 daniel-mar 39
        register(editor);
40
      });
41
    }
42
 
43
    Plugin();
44
 
45
}());