Skip to content

Commit dec699c

Browse files
feat: Add ck5 trackchanges sidebar
1 parent 63fd839 commit dec699c

File tree

2 files changed

+25
-18
lines changed

2 files changed

+25
-18
lines changed

demos/html/ckeditor5/src/app.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ ClassicEditor.create(document.querySelector("#editor"), {
4343
"comment",
4444
"sourceEditing",
4545
],
46+
// Configure the sidebar for annotations
47+
sidebar: {
48+
container: document.querySelector('#editor-annotations')
49+
},
4650
// translations: [
4751
// coreTranslations,
4852
// ],
Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
11
body {
2-
background-color: #e4e6e7;
2+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
3+
background: #f7f7f7;
4+
margin: 0;
5+
padding: 1.5em;
36
}
47

5-
.ck-editor {
6-
background-color: #fff !important;
7-
border-radius: 10px !important;
8-
margin: 0 auto !important;
9-
max-width: 760px !important;
10-
width: 75% !important;
8+
/* CKEditor5 official wide sidebar styling */
9+
.editor-container {
10+
--ckeditor5-preview-sidebar-width: 270px;
1111
}
1212

13-
.ck-editor:hover {
14-
box-shadow: 0 0 10px #7af78f;
13+
.editor-container__editor-wrapper {
14+
display: flex;
15+
width: fit-content;
1516
}
1617

17-
.ck-content {
18-
border-bottom-left-radius: 10px;
19-
border-bottom-right-radius: 10px;
20-
min-height: 250px;
18+
.editor-container--classic-editor .editor-container__editor {
19+
min-width: 795px;
20+
max-width: 795px;
2121
}
2222

23-
.ck-rounded-corners,
24-
.ck.ck-editor__editable:not(.ck-editor__nested-editable),
25-
.ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-rounded-corners {
26-
border-bottom-left-radius: 10px !important;
27-
border-bottom-right-radius: 10px !important;
23+
.editor-container__sidebar {
24+
min-width: var(--ckeditor5-preview-sidebar-width);
25+
max-width: var(--ckeditor5-preview-sidebar-width);
26+
margin-top: 28px;
27+
margin-left: 10px;
28+
margin-right: 10px;
2829
}
30+
31+
/* Remove duplicate styling and keep only what's necessary */

0 commit comments

Comments
 (0)