author | ymh <ymh.work@gmail.com> |
Tue, 22 Oct 2019 16:11:46 +0200 | |
changeset 15 | 3d4e9c994f10 |
parent 9 | 177826044cd9 |
permissions | -rw-r--r-- |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1 |
(function () { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
2 |
var hr = (function () { |
9 | 3 |
'use strict'; |
4 |
||
5 |
var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
6 |
|
9 | 7 |
var register = function (editor) { |
8 |
editor.addCommand('InsertHorizontalRule', function () { |
|
9 |
editor.execCommand('mceInsertContent', false, '<hr />'); |
|
10 |
}); |
|
11 |
}; |
|
12 |
var Commands = { register: register }; |
|
5 | 13 |
|
9 | 14 |
var register$1 = function (editor) { |
15 |
editor.addButton('hr', { |
|
16 |
icon: 'hr', |
|
17 |
tooltip: 'Horizontal line', |
|
18 |
cmd: 'InsertHorizontalRule' |
|
19 |
}); |
|
20 |
editor.addMenuItem('hr', { |
|
21 |
icon: 'hr', |
|
22 |
text: 'Horizontal line', |
|
23 |
cmd: 'InsertHorizontalRule', |
|
24 |
context: 'insert' |
|
25 |
}); |
|
26 |
}; |
|
27 |
var Buttons = { register: register$1 }; |
|
5 | 28 |
|
9 | 29 |
global.add('hr', function (editor) { |
30 |
Commands.register(editor); |
|
31 |
Buttons.register(editor); |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
32 |
}); |
9 | 33 |
function Plugin () { |
34 |
} |
|
5 | 35 |
|
9 | 36 |
return Plugin; |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
37 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
38 |
}()); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
39 |
})(); |