mirror of
https://github.com/docmost/docmost.git
synced 2025-11-14 15:51:10 +10:00
Fix: editor formatting (#137)
* reduce space between list items * reduce spacing * Make inline code readable in dark mode * Disable spellcheck in code * fix numbered list in toggle block
This commit is contained in:
@ -56,6 +56,11 @@ export const mainExtensions = [
|
|||||||
color: "#70CFF8",
|
color: "#70CFF8",
|
||||||
},
|
},
|
||||||
codeBlock: false,
|
codeBlock: false,
|
||||||
|
code: {
|
||||||
|
HTMLAttributes: {
|
||||||
|
spellcheck: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
Placeholder.configure({
|
Placeholder.configure({
|
||||||
placeholder: ({ node }) => {
|
placeholder: ({ node }) => {
|
||||||
@ -131,6 +136,9 @@ export const mainExtensions = [
|
|||||||
}),
|
}),
|
||||||
CodeBlockLowlight.configure({
|
CodeBlockLowlight.configure({
|
||||||
lowlight,
|
lowlight,
|
||||||
|
HTMLAttributes: {
|
||||||
|
spellcheck: false,
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
Selection,
|
Selection,
|
||||||
] as any;
|
] as any;
|
||||||
|
|||||||
@ -31,8 +31,6 @@ import TableCellMenu from "@/features/editor/components/table/table-cell-menu.ts
|
|||||||
import TableMenu from "@/features/editor/components/table/table-menu.tsx";
|
import TableMenu from "@/features/editor/components/table/table-menu.tsx";
|
||||||
import ImageMenu from "@/features/editor/components/image/image-menu.tsx";
|
import ImageMenu from "@/features/editor/components/image/image-menu.tsx";
|
||||||
import CalloutMenu from "@/features/editor/components/callout/callout-menu.tsx";
|
import CalloutMenu from "@/features/editor/components/callout/callout-menu.tsx";
|
||||||
import { uploadImageAction } from "@/features/editor/components/image/upload-image-action.tsx";
|
|
||||||
import { uploadVideoAction } from "@/features/editor/components/video/upload-video-action.tsx";
|
|
||||||
import VideoMenu from "@/features/editor/components/video/video-menu.tsx";
|
import VideoMenu from "@/features/editor/components/video/video-menu.tsx";
|
||||||
import {
|
import {
|
||||||
handleFileDrop,
|
handleFileDrop,
|
||||||
|
|||||||
@ -86,4 +86,22 @@
|
|||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:not(pre) > code {
|
||||||
|
font-family: "JetBrainsMono", var(--mantine-font-family-monospace);
|
||||||
|
line-height: var(--mantine-line-height);
|
||||||
|
padding: 2px calc(var(--mantine-spacing-xs) / 2);
|
||||||
|
border-radius: var(--mantine-radius-sm);
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
@mixin where-light {
|
||||||
|
background-color: var(--code-bg, var(--mantine-color-gray-1));
|
||||||
|
color: var(--mantine-color-black);
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin where-dark {
|
||||||
|
background-color: var(--mantine-color-dark-8);
|
||||||
|
color: var(--mantine-color-gray-4);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,6 +20,11 @@
|
|||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-top: 0.65em;
|
||||||
|
margin-bottom: 0.65em;
|
||||||
|
}
|
||||||
|
|
||||||
ul,
|
ul,
|
||||||
ol {
|
ol {
|
||||||
padding: 0 1rem;
|
padding: 0 1rem;
|
||||||
@ -27,6 +32,12 @@
|
|||||||
margin-bottom: 0.25rem;
|
margin-bottom: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul p,
|
||||||
|
ol p {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
h1,
|
h1,
|
||||||
h2,
|
h2,
|
||||||
h3,
|
h3,
|
||||||
@ -80,15 +91,9 @@
|
|||||||
outline: 2px solid #70cff8;
|
outline: 2px solid #70cff8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.node-mathInline {
|
|
||||||
.katex-display {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
& > .react-renderer {
|
& > .react-renderer {
|
||||||
margin-top: var(--mantine-spacing-xl);
|
margin-top: var(--mantine-spacing-sm);
|
||||||
margin-bottom: var(--mantine-spacing-xl);
|
margin-bottom: var(--mantine-spacing-sm);
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
|||||||
@ -50,8 +50,7 @@
|
|||||||
|
|
||||||
[data-type="detailsContainer"] {
|
[data-type="detailsContainer"] {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin-left: 0.2em;
|
padding: 4px;
|
||||||
overflow-x: hidden;
|
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user