diff --git a/package-lock.json b/package-lock.json index 56161504844443ddea88866a8ac0b472105a54ed..814f67900fb0434c8362a94fd3031affadb110b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,7 +32,6 @@ "@ckeditor/ckeditor5-indent": "34.2.0", "@ckeditor/ckeditor5-paragraph": "34.2.0", "@ckeditor/ckeditor5-remove-format": "34.2.0", - "@ckeditor/ckeditor5-select-all": "34.2.0", "@ckeditor/ckeditor5-source-editing": "34.2.0", "@ckeditor/ckeditor5-special-characters": "34.2.0", "@ckeditor/ckeditor5-table": "34.2.0", diff --git a/package.json b/package.json index 7d8898bebd500c398fee593f1ea215fa5e51e6e4..cbd08e5e6c489fac90868e11ae41bdd01ed0a73a 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,6 @@ "@ckeditor/ckeditor5-indent": "34.2.0", "@ckeditor/ckeditor5-paragraph": "34.2.0", "@ckeditor/ckeditor5-remove-format": "34.2.0", - "@ckeditor/ckeditor5-select-all": "34.2.0", "@ckeditor/ckeditor5-source-editing": "34.2.0", "@ckeditor/ckeditor5-special-characters": "34.2.0", "@ckeditor/ckeditor5-table": "34.2.0", diff --git a/resources/assets/javascripts/chunks/wysiwyg.js b/resources/assets/javascripts/chunks/wysiwyg.js index 2d1e7539d09ef673e0bbe66735bca00b7c6fe045..0fae3efc3ff7b1584c98400e51fed464981a2780 100644 --- a/resources/assets/javascripts/chunks/wysiwyg.js +++ b/resources/assets/javascripts/chunks/wysiwyg.js @@ -4,7 +4,6 @@ import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat'; import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote'; import BoldPlugin from '@ckeditor/ckeditor5-basic-styles/src/bold'; import ClassicEditorBase from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'; -import Code from '@ckeditor/ckeditor5-basic-styles/src/code'; import CodeBlock from '@ckeditor/ckeditor5-code-block/src/codeblock'; import EasyImagePlugin from '@ckeditor/ckeditor5-easy-image/src/easyimage'; import EssentialsPlugin from '@ckeditor/ckeditor5-essentials/src/essentials'; @@ -29,7 +28,6 @@ import List from '@ckeditor/ckeditor5-list/src/list'; import ListProperties from '@ckeditor/ckeditor5-list/src/listproperties'; import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph'; import RemoveFormat from '@ckeditor/ckeditor5-remove-format/src/removeformat.js'; -import SelectAll from '@ckeditor/ckeditor5-select-all/src/selectall'; import SourceEditing from '@ckeditor/ckeditor5-source-editing/src/sourceediting'; import SpecialCharacters from '@ckeditor/ckeditor5-special-characters/src/specialcharacters.js'; import SpecialCharactersCurrency from '@ckeditor/ckeditor5-special-characters/src/specialcharacterscurrency.js'; @@ -66,7 +64,6 @@ ClassicEditor.builtinPlugins = [ Autoformat, BlockQuote, BoldPlugin, - Code, CodeBlock, EssentialsPlugin, FindAndReplace, @@ -87,7 +84,6 @@ ClassicEditor.builtinPlugins = [ Mathematics, Paragraph, RemoveFormat, - SelectAll, SourceEditing, SpecialCharacters, SpecialCharactersCurrency, @@ -138,25 +134,7 @@ ClassicEditor.defaultConfig = { items: [ 'undo', 'redo', - '|', 'findAndReplace', - 'selectAll', - '|', - 'specialCharacters', - 'horizontalLine', - '|', - 'insertBlockQuote', - 'splitBlockQuote', - 'removeBlockQuote', - '|', - 'link', - 'insertTable', - 'uploadImage', - 'codeBlock', - 'math', - 'studip-wiki', - '-', - 'heading', '|', 'bold', 'italic', @@ -164,24 +142,36 @@ ClassicEditor.defaultConfig = { 'strikethrough', 'subscript', 'superscript', - 'code', + '|', 'removeFormat', '|', - 'fontColor', - 'fontBackgroundColor', + 'bulletedList', + 'numberedList', + '|', + 'outdent', + 'indent', '|', 'alignment:left', 'alignment:right', 'alignment:center', 'alignment:justify', + '-', + 'heading', + 'fontColor', + 'fontBackgroundColor', '|', - 'bulletedList', - 'numberedList', - '|', - 'outdent', - 'indent', + 'link', + 'insertTable', + 'uploadImage', + 'codeBlock', + 'math', + 'studip-wiki', + 'specialCharacters', + 'horizontalLine', '|', - 'open-a11y-dialog', + 'insertBlockQuote', + 'splitBlockQuote', + 'removeBlockQuote', '|', 'sourceEditing', ], diff --git a/resources/assets/javascripts/lib/wysiwyg.js b/resources/assets/javascripts/lib/wysiwyg.js index c14a0bf58e16eb9ae6cf8272e4b9e9bfcd09021b..a1cb6bbc6056733324f13664c5158b34c6d94ad8 100644 --- a/resources/assets/javascripts/lib/wysiwyg.js +++ b/resources/assets/javascripts/lib/wysiwyg.js @@ -113,6 +113,11 @@ function replaceTextarea(textarea) { } }); + const button = ckeditor.ui.view.toolbar.items.find( item => item.class === "ck-source-editing-button"); + if (button) { + button.withText = false; + } + // TODO: Kein updateSourceElement im SourceEditing-Modus // $(ckeditor.container.$).on('blur', '.CodeMirror', function (event) { // ckeditor.updateElement(); // also update in source mode diff --git a/resources/assets/stylesheets/studip-cke-ui.css b/resources/assets/stylesheets/studip-cke-ui.css index 8f27f8aac63c34eec33b955ac145bf2b270fd31d..07e0d028e9c2fb2f70910f295fb87599e2296517 100644 --- a/resources/assets/stylesheets/studip-cke-ui.css +++ b/resources/assets/stylesheets/studip-cke-ui.css @@ -74,6 +74,9 @@ } /* buttons */ +.ck.ck-button, a.ck.ck-button { + font-size: 12px; +} .ck.ck-button:hover { cursor: pointer; @@ -212,6 +215,10 @@ a.ck.ck-button.ck-button_with-text.ck-dropdown__button:not(.ck-disabled):hover { display: none; } +.ck.ck-button.ck-source-editing-button .ck.ck-button__label { + display: none; +} + /* links */ .ck .ck-fake-link-selection, .ck .ck-link_selected {