8
0
Quellcode durchsuchen

Import SVG files straight to JS.

Piotrek Koszuliński vor 9 Jahren
Ursprung
Commit
1f83a68bf1

+ 2 - 1
packages/ckeditor5-basic-styles/src/bold.js

@@ -10,6 +10,7 @@
 import Plugin from 'ckeditor5-core/src/plugin';
 import Plugin from 'ckeditor5-core/src/plugin';
 import BoldEngine from './boldengine';
 import BoldEngine from './boldengine';
 import ButtonView from 'ckeditor5-ui/src/button/buttonview';
 import ButtonView from 'ckeditor5-ui/src/button/buttonview';
+import boldIcon from '../theme/icons/bold.svg';
 
 
 /**
 /**
  * The bold feature. It introduces the Bold button and the <kbd>Ctrl+B</kbd> keystroke.
  * The bold feature. It introduces the Bold button and the <kbd>Ctrl+B</kbd> keystroke.
@@ -41,7 +42,7 @@ export default class Bold extends Plugin {
 
 
 			view.set( {
 			view.set( {
 				label: t( 'Bold' ),
 				label: t( 'Bold' ),
-				icon: 'bold',
+				icon: boldIcon,
 				keystroke
 				keystroke
 			} );
 			} );
 
 

+ 2 - 1
packages/ckeditor5-basic-styles/src/italic.js

@@ -10,6 +10,7 @@
 import Plugin from 'ckeditor5-core/src/plugin';
 import Plugin from 'ckeditor5-core/src/plugin';
 import ItalicEngine from './italicengine';
 import ItalicEngine from './italicengine';
 import ButtonView from 'ckeditor5-ui/src/button/buttonview';
 import ButtonView from 'ckeditor5-ui/src/button/buttonview';
+import italicIcon from '../theme/icons/italic.svg';
 
 
 /**
 /**
  * The italic feature. It introduces the Italic button and the <kbd>Ctrl+I</kbd> keystroke.
  * The italic feature. It introduces the Italic button and the <kbd>Ctrl+I</kbd> keystroke.
@@ -41,7 +42,7 @@ export default class Italic extends Plugin {
 
 
 			view.set( {
 			view.set( {
 				label: t( 'Italic' ),
 				label: t( 'Italic' ),
-				icon: 'italic',
+				icon: italicIcon,
 				keystroke
 				keystroke
 			} );
 			} );