Files
Trilium/patches/@ckeditor__ckeditor5-code-block.patch

42 lines
1.2 KiB
Diff
Raw Normal View History

diff --git a/dist/index.css b/dist/index.css
index 50d1b0005b464f33fb3f07f69c06f36a35e0c406..785e95ceeb7fce12be6249b43abf9b83e15fcfde 100644
--- a/dist/index.css
+++ b/dist/index.css
@@ -26,12 +26,10 @@
}
.ck-content pre {
- color: #353535;
text-align: left;
tab-size: 4;
white-space: pre-wrap;
direction: ltr;
- background: #c7c7c74d;
border: 1px solid #c4c4c4;
border-radius: 2px;
min-width: 200px;
@@ -40,6 +38,11 @@
font-style: normal;
}
+.ck-content pre:not(.hljs) {
+ color: #353535;
+ background: #c7c7c74d;
+}
+
.ck-content pre code {
background: unset;
border-radius: 0;
diff --git a/dist/index.js b/dist/index.js
index 2e231803ce8450f8498e2a37f1be8c32ff52d090..b54c4943904d2b325f3ca6cef08888b3defc29b9 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -673,6 +673,7 @@ function getLastOutdentableSequenceRange(model, position, sequence) {
// Attributes added only in the editing view.
if (useLabels) {
preAttributes['data-language'] = languagesToLabels[codeBlockLanguage];
+ preAttributes.class = "hljs";
preAttributes.spellcheck = 'false';
}
const codeAttributes = languagesToClasses[codeBlockLanguage] ? {