comparison src/sceditor.js @ 9:9159df67520a

remove "icons" option
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 07 Aug 2022 00:19:52 -0600
parents df1e18048d97
children 933a459aa182
comparison
equal deleted inserted replaced
8:292d40f68d50 9:9159df67520a
6136 toolbar = createElement('div', { 6136 toolbar = createElement('div', {
6137 className: 'sceditor-toolbar', 6137 className: 'sceditor-toolbar',
6138 unselectable: 'on' 6138 unselectable: 'on'
6139 }); 6139 });
6140 6140
6141 if (options.icons in SCEditor.icons) { 6141 icons = SCEditor.icons.fn();
6142 icons = new SCEditor.icons[options.icons]();
6143 }
6144 6142
6145 each(groups, function (_, menuItems) { 6143 each(groups, function (_, menuItems) {
6146 group = createElement('div', { 6144 group = createElement('div', {
6147 className: 'sceditor-group' 6145 className: 'sceditor-group'
6148 }); 6146 });
8932 SCEditor.locale = {}; 8930 SCEditor.locale = {};
8933 8931
8934 SCEditor.formats = {}; 8932 SCEditor.formats = {};
8935 SCEditor.icons = {}; 8933 SCEditor.icons = {};
8936 8934
8935 // default icons
8936 SCEditor.icons.fn = function() {
8937 let cssUrl = baseUrl + 'icons/famfamfam/famfamfam.css';
8938 let html = '<style>@import "' + cssUrl + '";</style>';
8939 document.head.insertAdjacentHTML('beforeend',html);
8940 return {};
8941 };
8942
8937 8943
8938 /** 8944 /**
8939 * Static command helper class 8945 * Static command helper class
8940 * @class command 8946 * @class command
8941 * @name sceditor.command 8947 * @name sceditor.command