mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
31 lines
648 B
JavaScript
31 lines
648 B
JavaScript
|
/**
|
||
|
* plugin.js
|
||
|
*
|
||
|
* Released under LGPL License.
|
||
|
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
||
|
*
|
||
|
* License: http://www.tinymce.com/license
|
||
|
* Contributing: http://www.tinymce.com/contributing
|
||
|
*/
|
||
|
|
||
|
/*global tinymce:true */
|
||
|
|
||
|
tinymce.PluginManager.add('hr', function(editor) {
|
||
|
editor.addCommand('InsertHorizontalRule', function() {
|
||
|
editor.execCommand('mceInsertContent', false, '<hr />');
|
||
|
});
|
||
|
|
||
|
editor.addButton('hr', {
|
||
|
icon: 'hr',
|
||
|
tooltip: 'Horizontal line',
|
||
|
cmd: 'InsertHorizontalRule'
|
||
|
});
|
||
|
|
||
|
editor.addMenuItem('hr', {
|
||
|
icon: 'hr',
|
||
|
text: 'Horizontal line',
|
||
|
cmd: 'InsertHorizontalRule',
|
||
|
context: 'insert'
|
||
|
});
|
||
|
});
|