aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Lucke <lucke@elan-ev.de>2022-10-21 03:29:05 +0000
committerMarcus Eibrink-Lunzenauer <lunzenauer@elan-ev.de>2022-10-21 03:29:05 +0000
commit0a2371708baafa34fc10f6bdacbbc8bb24dd9046 (patch)
tree4579d14583c4214868404b42c23f1a468d558c13
parent0418eb93d630f30aa0327c6d75d13a7f28bdbd1a (diff)
fix #1690
Closes #1690 Merge request studip/studip!1096
-rw-r--r--package-lock.json1
-rw-r--r--package.json1
-rw-r--r--resources/assets/javascripts/chunks/wysiwyg.js52
-rw-r--r--resources/assets/javascripts/lib/wysiwyg.js5
-rw-r--r--resources/assets/stylesheets/studip-cke-ui.css7
5 files changed, 33 insertions, 33 deletions
diff --git a/package-lock.json b/package-lock.json
index 5616150..814f679 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 7d8898b..cbd08e5 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 2d1e753..0fae3ef 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 c14a0bf..a1cb6bb 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 8f27f8a..07e0d02 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 {