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