2017-05-08 01:32:46 -04:00
|
|
|
(function () {
|
2018-04-25 18:35:21 -04:00
|
|
|
var hr = (function () {
|
2019-01-29 15:19:51 -05:00
|
|
|
'use strict';
|
2017-05-08 01:32:46 -04:00
|
|
|
|
2019-01-29 15:19:51 -05:00
|
|
|
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
2017-05-08 01:32:46 -04:00
|
|
|
|
2019-01-29 15:19:51 -05:00
|
|
|
var register = function (editor) {
|
|
|
|
editor.addCommand('InsertHorizontalRule', function () {
|
|
|
|
editor.execCommand('mceInsertContent', false, '<hr />');
|
|
|
|
});
|
|
|
|
};
|
|
|
|
var Commands = { register: register };
|
2017-05-08 01:32:46 -04:00
|
|
|
|
2019-01-29 15:19:51 -05:00
|
|
|
var register$1 = function (editor) {
|
|
|
|
editor.addButton('hr', {
|
|
|
|
icon: 'hr',
|
|
|
|
tooltip: 'Horizontal line',
|
|
|
|
cmd: 'InsertHorizontalRule'
|
|
|
|
});
|
|
|
|
editor.addMenuItem('hr', {
|
|
|
|
icon: 'hr',
|
|
|
|
text: 'Horizontal line',
|
|
|
|
cmd: 'InsertHorizontalRule',
|
|
|
|
context: 'insert'
|
|
|
|
});
|
|
|
|
};
|
|
|
|
var Buttons = { register: register$1 };
|
2017-05-08 01:32:46 -04:00
|
|
|
|
2019-01-29 15:19:51 -05:00
|
|
|
global.add('hr', function (editor) {
|
|
|
|
Commands.register(editor);
|
|
|
|
Buttons.register(editor);
|
|
|
|
});
|
|
|
|
function Plugin () {
|
|
|
|
}
|
2014-03-05 19:54:14 -05:00
|
|
|
|
2019-01-29 15:19:51 -05:00
|
|
|
return Plugin;
|
2017-05-08 01:32:46 -04:00
|
|
|
|
2018-04-25 18:35:21 -04:00
|
|
|
}());
|
2017-05-08 01:32:46 -04:00
|
|
|
})();
|