2 * @param {Editor} editor
5 function register(editor, url) {
6 editor.addCommand('InsertHorizontalRule', () => {
7 const hrElem = document.createElement('hr');
8 const cNode = editor.selection.getNode();
9 const {parentNode} = cNode;
10 parentNode.insertBefore(hrElem, cNode);
13 editor.ui.registry.addButton('customhr', {
14 icon: 'horizontal-rule',
15 tooltip: 'Insert horizontal line',
17 editor.execCommand('InsertHorizontalRule');
23 * @param {WysiwygConfigOptions} options
26 export function getPlugin(options) {