Skip to content

Commit

Permalink
Add and configure Font plugin to ckeditor
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasnatter committed Jun 20, 2022
1 parent 28f00bb commit cca5e5b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions assets/admin/app.js
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
// Add project specific javascript code and import of additional bundles here:
import {ckeditorPluginRegistry, ckeditorConfigRegistry} from 'sulu-admin-bundle/containers';
import Font from '@ckeditor/ckeditor5-font/src/font';

ckeditorPluginRegistry.add(Font);
ckeditorConfigRegistry.add((config) => ({
toolbar: [...config.toolbar, 'fontSize', 'fontFamily', 'fontColor', 'fontBackgroundColor'],
}));
1 change: 1 addition & 0 deletions assets/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"watch": "webpack --mode development --watch"
},
"dependencies": {
"@ckeditor/ckeditor5-font": "^27.1.0",
"mobx": "^4.0.0",
"mobx-react": "^5.0.0",
"react": "^17.0.0",
Expand Down

0 comments on commit cca5e5b

Please sign in to comment.