diff --git a/_regroup/ckeditor5-build-trilium/ckeditor-content.css b/_regroup/ckeditor5-build-trilium/ckeditor-content.css index 0ebbae93d..94d440047 100644 --- a/_regroup/ckeditor5-build-trilium/ckeditor-content.css +++ b/_regroup/ckeditor5-build-trilium/ckeditor-content.css @@ -1,48 +1,3 @@ -/* !!!!!! TRILIUM CUSTOM CHANGES !!!!!! */ - -.printed-content .ck-widget__selection-handle, .printed-content .ck-widget__type-around { /* gets rid of triangles: https://github.com/zadam/trilium/issues/1129 */ - display: none; -} - -.page-break { - page-break-after: always; -} - -.printed-content .page-break:after, -.printed-content .page-break > * { - display: none !important; -} - -.ck-content li p { - margin: 0 !important; -} - -.admonition { - --accent-color: var(--card-border-color); - border: 1px solid var(--accent-color); - box-shadow: var(--card-box-shadow); - background: var(--card-background-color); - border-radius: 0.5em; - padding: 1em; - margin: 1.25em 0; - position: relative; - overflow: hidden; -} - -.admonition p:last-child { - margin-bottom: 0; -} - -.admonition p, h2 { - margin-top: 0; -} - -.admonition.note { --accent-color: #69c7ff; } -.admonition.tip { --accent-color: #40c025; } -.admonition.important { --accent-color: #9839f7; } -.admonition.caution { --accent-color: #ff2e2e; } -.admonition.warning { --accent-color: #e2aa03; } - /* * CKEditor 5 (v41.0.0) content styles. * Generated on Fri, 26 Jan 2024 10:23:49 GMT. diff --git a/packages/ckeditor5/src/theme/ck-content.css b/packages/ckeditor5/src/theme/ck-content.css new file mode 100644 index 000000000..a786ccd23 --- /dev/null +++ b/packages/ckeditor5/src/theme/ck-content.css @@ -0,0 +1,42 @@ +.printed-content .ck-widget__selection-handle, .printed-content .ck-widget__type-around { /* gets rid of triangles: https://github.com/zadam/trilium/issues/1129 */ + display: none; +} + +.page-break { + page-break-after: always; +} + +.printed-content .page-break:after, +.printed-content .page-break > * { + display: none !important; +} + +.ck-content li p { + margin: 0 !important; +} + +.admonition { + --accent-color: var(--card-border-color); + border: 1px solid var(--accent-color); + box-shadow: var(--card-box-shadow); + background: var(--card-background-color); + border-radius: 0.5em; + padding: 1em; + margin: 1.25em 0; + position: relative; + overflow: hidden; +} + +.admonition p:last-child { + margin-bottom: 0; +} + +.admonition p, h2 { + margin-top: 0; +} + +.admonition.note { --accent-color: #69c7ff; } +.admonition.tip { --accent-color: #40c025; } +.admonition.important { --accent-color: #9839f7; } +.admonition.caution { --accent-color: #ff2e2e; } +.admonition.warning { --accent-color: #e2aa03; } \ No newline at end of file diff --git a/packages/ckeditor5/vite.config.ts b/packages/ckeditor5/vite.config.ts index fcf940343..64a0ea57a 100644 --- a/packages/ckeditor5/vite.config.ts +++ b/packages/ckeditor5/vite.config.ts @@ -17,6 +17,7 @@ export default defineConfig(() => ({ outDir: './dist', emptyOutDir: true, reportCompressedSize: true, + cssCodeSplit: true, commonjsOptions: { transformMixedEsModules: true, }, @@ -31,7 +32,11 @@ export default defineConfig(() => ({ }, rollupOptions: { // External packages that should not be bundled into your library. - external: [] + external: [], + input: { + index: "src/index.ts", + content: "src/theme/ck-content.css" + } }, }, }));