diff 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
line wrap: on
line diff
--- a/src/sceditor.js	Fri Aug 05 12:56:50 2022 -0600
+++ b/src/sceditor.js	Sun Aug 07 00:19:52 2022 -0600
@@ -6138,9 +6138,7 @@
 				unselectable: 'on'
 			});
 
-			if (options.icons in SCEditor.icons) {
-				icons = new SCEditor.icons[options.icons]();
-			}
+			icons = SCEditor.icons.fn();
 
 			each(groups, function (_, menuItems) {
 				group = createElement('div', {
@@ -8934,6 +8932,14 @@
 	SCEditor.formats = {};
 	SCEditor.icons = {};
 
+	// default icons
+	SCEditor.icons.fn = function() {
+		let cssUrl = baseUrl + 'icons/famfamfam/famfamfam.css';
+		let html = '<style>@import "' + cssUrl + '";</style>';
+		document.head.insertAdjacentHTML('beforeend',html);
+		return {};
+	};
+
 
 	/**
 	 * Static command helper class