Skip to content

Commit

Permalink
Ckeditor4 darkmode
Browse files Browse the repository at this point in the history
  • Loading branch information
gigamaster committed May 10, 2024
1 parent e5406f2 commit f6ea0a8
Show file tree
Hide file tree
Showing 29 changed files with 353 additions and 91 deletions.
12 changes: 6 additions & 6 deletions html/modules/ckeditor4/ckeditor/build-config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license/
*/

Expand All @@ -13,10 +13,10 @@
* (1) https://ckeditor.com/cke4/builder
* Visit online builder to build CKEditor from scratch.
*
* (2) https://ckeditor.com/cke4/builder/069129c9382503296cffba6b1b154b95
* (2) https://ckeditor.com/cke4/builder/c2414895d22f91fbc66db4d1a45da176
* Visit online builder to build CKEditor, starting with the same setup as before.
*
* (3) https://ckeditor.com/cke4/builder/download/069129c9382503296cffba6b1b154b95
* (3) https://ckeditor.com/cke4/builder/download/c2414895d22f91fbc66db4d1a45da176
* Straight download link to the latest version of CKEditor (Optimized) with the same setup as before.
*
* NOTE:
Expand All @@ -43,6 +43,7 @@ var CKBUILDER_CONFIG = {
'.travis.yml',
'bender-err.log',
'bender-out.log',
'bender-runner.config.json',
'bender.ci.js',
'bender.js',
'dev',
Expand Down Expand Up @@ -97,8 +98,6 @@ var CKBUILDER_CONFIG = {
'showborders' : 1,
'smiley' : 1,
'sourcearea' : 1,
'stylescombo' : 1,
'stylesheetparser' : 1,
'tab' : 1,
'table' : 1,
'tableresize' : 1,
Expand All @@ -116,6 +115,7 @@ var CKBUILDER_CONFIG = {
'en' : 1,
'fr' : 1,
'ja' : 1,
'pt' : 1
'pt' : 1,
'ru' : 1
}
};
10 changes: 2 additions & 8 deletions html/modules/ckeditor4/ckeditor/ckeditor.js

Large diffs are not rendered by default.

40 changes: 18 additions & 22 deletions html/modules/ckeditor4/ckeditor/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* CKEditor configuration for XCL 2.3.x
* CKEditor configuration for XCL 2.4.0
* Date : 20-04-2024 @gigamaster
*
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
Expand All @@ -13,7 +13,7 @@ CKEDITOR.editorConfig = function( config ) {
config.language = 'en';

config.width = '100%'; // Editor dimension
config.height = '100%'; // Use pixels or CSS unit (percent)
config.height = '320px'; // Use pixels or CSS unit (percent)

//var uitheme = JSON.parse(localStorage.getItem('uicolor'));
// config.uiColor = localStorage.getItem('uicolor');
Expand All @@ -37,6 +37,7 @@ CKEDITOR.editorConfig = function( config ) {

// Minimize toolbar
config.toolbarCanCollapse = true;

// NOTE
// The following options can be set in Control Panel > CKEditor4 > Preferences

Expand All @@ -51,27 +52,22 @@ CKEDITOR.editorConfig = function( config ) {
//config.editorplaceholder = 'Start typing here…';


config.magicline_color = '#e43140';

config.toolbarGroups = [
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] },
{ name: 'tools', groups: [ 'tools' ] },
{ name: 'forms', groups: [ 'forms' ] },
'/',
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi', 'paragraph' ] },
{ name: 'links', groups: [ 'links' ] },
{ name: 'insert', groups: [ 'insert' ] },
config.magicline_color = '#e44140;';

config.toolbarGroups = [
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] },
{ name: 'tools', groups: [ 'tools' ] },
'/',
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi', 'paragraph' ] },
{ name: 'links', groups: [ 'links' ] },
{ name: 'insert', groups: [ 'insert' ] },
{ name: 'styles', groups: [ 'styles' ] },
{ name: 'colors', groups: [ 'colors' ] },
'/',
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
{ name: 'styles', groups: [ 'styles' ] },
{ name: 'others', groups: [ 'others' ] },
{ name: 'about', groups: [ 'about' ] }
];


{ name: 'others', groups: [ 'others' ] }
];
// 'la:Language:rtl' = right to left
// config.language_list = ['ja:Japanese:rtl'];
config.language_list = [ 'en:English', 'fr:Français', 'ja:Japanese', 'pt:Portuguese' ];
Expand Down
39 changes: 25 additions & 14 deletions html/modules/ckeditor4/ckeditor/contents.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
html,

body
{
/* Font */
Expand All @@ -11,26 +11,37 @@ body
font-size: 12px;

/* Text color */
/*color: #333;*/
color: var(--ckeditor-color, #bbc6ce);
/* Remove the background color to make it transparent. */
/*background-color: #fff;*/
background : var(--ckeditor-background, #11191f92);

margin: 20px;
padding:10px;
height: 100%;
/* color: #333; */

/* Remove the background color to make it transparent. #fff */
background: var( --cke-background, #fff);
color: var( --cke-color, #111);
margin: 1rem;
}
textarea.cke_source {
background: var( --cke-background, #fff);
color: var( --cke-color, #111);
font-family: 'Courier New', Monospace;
font-size: small;
white-space: pre-wrap;
border: 0;
padding: 0;
margin: 0;
display: block;
}

.cke_editable
{
font-size: 13px;
line-height: 1.6;

line-height: 1.4;
background: var( --cke-background, #fff);
color: var( --cke-color, #111);
/* Fix for missing scrollbars with RTL texts. (#10488) */
word-wrap: break-word;
}

.cke_contents{border:solid 1px #696969;background-color:var(--ckeditor-background);}
.cke_panel{
background: var(--ckeditor-background)!important;
}
blockquote
{
font-style: italic;
Expand Down
2 changes: 1 addition & 1 deletion html/modules/ckeditor4/ckeditor/lang/en.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion html/modules/ckeditor4/ckeditor/lang/fr.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion html/modules/ckeditor4/ckeditor/lang/ja.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion html/modules/ckeditor4/ckeditor/lang/pt.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions html/modules/ckeditor4/ckeditor/lang/ru.js

Large diffs are not rendered by default.

Binary file modified html/modules/ckeditor4/ckeditor/plugins/icons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified html/modules/ckeditor4/ckeditor/plugins/icons_hidpi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions html/modules/ckeditor4/ckeditor/plugins/markTag/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Peter Neumann

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions html/modules/ckeditor4/ckeditor/plugins/markTag/lang/en.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CKEDITOR.plugins.setLang('markTag', 'en', {
button: 'Marked Text',
})
33 changes: 33 additions & 0 deletions html/modules/ckeditor4/ckeditor/plugins/markTag/plugin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* markText Plugin
*
* @author Peter Neumann
*/

CKEDITOR.plugins.add('markTag', {
icons: 'mark',
lang: [
'en', 'de',
],
init: function (editor) {

var style = new CKEDITOR.style({ element: 'mark' })

// Listen for contextual style activation
editor.attachStyleStateChange(style, function (state) {
!editor.readOnly && editor.getCommand('wrapMark').setState(state)
})

// Adding/Creating command.
editor.addCommand('wrapMark', new CKEDITOR.styleCommand(style))

// Register the button, when the button plugin is enabled
if (editor.ui.addButton) {
editor.ui.addButton('Mark', {
label: editor.lang.markTag.button,
command: 'wrapMark',
toolbar: 'basicstyles',
})
}
},
})
Loading

0 comments on commit f6ea0a8

Please sign in to comment.