comparison src/sceditor.js @ 45:bc1bce78276d

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 30 Aug 2022 02:03:50 -0600
parents 48c153a1a6cf
children ab2dc8736d88
comparison
equal deleted inserted replaced
44:48c153a1a6cf 45:bc1bce78276d
1810 'content="text/html;charset={charset}" />' + 1810 'content="text/html;charset={charset}" />' +
1811 '<link rel="stylesheet" type="text/css" href="{style}" />' + 1811 '<link rel="stylesheet" type="text/css" href="{style}" />' +
1812 '</head>' + 1812 '</head>' +
1813 '<body contenteditable="true" {spellcheck}><p></p></body>' + 1813 '<body contenteditable="true" {spellcheck}><p></p></body>' +
1814 '</html>', 1814 '</html>',
1815
1816 toolbarButton: '<button>{icon}</button>',
1817 1815
1818 emoticon: '<img src="{url}" data-sceditor-emoticon="{key}" ' + 1816 emoticon: '<img src="{url}" data-sceditor-emoticon="{key}" ' +
1819 'alt="{key}" title="{tooltip}" />', 1817 'alt="{key}" title="{tooltip}" />',
1820 1818
1821 fontOpt: '<a class="sceditor-font-option" href="#" ' + 1819 fontOpt: '<a class="sceditor-font-option" href="#" ' +
4763 if (!command || exclude.indexOf(commandName) > -1) { 4761 if (!command || exclude.indexOf(commandName) > -1) {
4764 return; 4762 return;
4765 } 4763 }
4766 4764
4767 let shortcut = command.shortcut; 4765 let shortcut = command.shortcut;
4768 let icon = command.icon; 4766 let icon = command.icon || '';
4769 let button = _tmpl( 'toolbarButton', { 4767 let button = '<button>' + icon + '</button>';
4770 name: commandName,
4771 icon: icon || '',
4772 } );
4773 button = parseHTML(button).firstChild; 4768 button = parseHTML(button).firstChild;
4774 button._sceTxtMode = !!command.txtExec; 4769 button._sceTxtMode = !!command.txtExec;
4775 button._sceWysiwygMode = !!command.exec; 4770 button._sceWysiwygMode = !!command.exec;
4776 toggleClass(button, 'disabled', !command.exec); 4771 toggleClass(button, 'disabled', !command.exec);
4777 onEvent2(button, 'click', function (e) { 4772 onEvent2(button, 'click', function (e) {