Skip to content

Commit 2b27a85

Browse files
committed
InlineCKEditor: Style lists, <hr>s
1 parent 7726f2c commit 2b27a85

2 files changed

Lines changed: 22 additions & 5 deletions

File tree

feincms3/static/feincms3/inline-ckeditor.css

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
}
1414

15-
.cke_textarea_inline * {
15+
.cke_textarea_inline *:not(hr) {
1616
background: none !important;
1717
color: inherit !important;
1818
border: none !important;
@@ -28,7 +28,7 @@
2828
.cke_textarea_inline h6 {
2929
font-size: 1em !important;
3030
font-weight: bold;
31-
margin: 0.5em 0 0.25em 0 !important;
31+
margin: 0.75rem 0 0.5rem 0 !important;
3232
}
3333

3434
.cke_textarea_inline h1 {
@@ -47,11 +47,28 @@
4747
font-size: 1.2em !important;
4848
}
4949

50-
.cke_textarea_inline p {
51-
margin-bottom: 1em !important;
50+
.cke_textarea_inline p,
51+
.cke_textarea_inline ul,
52+
.cke_textarea_inline ol,
53+
.cke_textarea_inline hr {
54+
margin-bottom: 0.5rem !important;
55+
}
56+
57+
.cke_textarea_inline > *:last-child {
58+
margin-bottom: 0 !important;
5259
}
5360

5461
.cke_textarea_inline a {
5562
color: blue !important;
5663
text-decoration: underline !important;
5764
}
65+
66+
.cke_textarea_inline ul > li {
67+
list-style: disc !important;
68+
margin-left: 1em !important;
69+
}
70+
71+
.cke_textarea_inline ol > li {
72+
list-style: decimal !important;
73+
margin-left: 1em !important;
74+
}

feincms3/static/feincms3/inline-ckeditor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
const config = Object.assign({}, DEFAULTS, window.CKEDITOR_CONFIG);
3232
document.querySelectorAll("textarea[data-ckeditor]").forEach((el) => {
3333
if (el.dataset.ckeditor !== "active" && !el.id.includes("__prefix__")) {
34-
CKEDITOR.inline(el, config);
34+
window.CKEDITOR.inline(el, config);
3535
el.dataset.ckeditor = "active";
3636
}
3737
});

0 commit comments

Comments
 (0)