From cca5e5badc10d29002398a70564e3523282b0066 Mon Sep 17 00:00:00 2001 From: Niklas Natter Date: Tue, 29 Sep 2020 16:58:15 +0200 Subject: [PATCH] Add and configure Font plugin to ckeditor --- assets/admin/app.js | 7 +++++++ assets/admin/package.json | 1 + 2 files changed, 8 insertions(+) diff --git a/assets/admin/app.js b/assets/admin/app.js index f8c3475f..164650ab 100644 --- a/assets/admin/app.js +++ b/assets/admin/app.js @@ -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'], +})); diff --git a/assets/admin/package.json b/assets/admin/package.json index 3103fce7..aa88db6c 100644 --- a/assets/admin/package.json +++ b/assets/admin/package.json @@ -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",