mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 06:23:06 +08:00
fix headings
This commit is contained in:
@@ -66,12 +66,14 @@ export default function ReadonlyPageEditor({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<div className="page-title">
|
||||||
<EditorProvider
|
<EditorProvider
|
||||||
editable={false}
|
editable={false}
|
||||||
immediatelyRender={true}
|
immediatelyRender={true}
|
||||||
extensions={titleExtensions}
|
extensions={titleExtensions}
|
||||||
content={title}
|
content={title}
|
||||||
></EditorProvider>
|
></EditorProvider>
|
||||||
|
</div>
|
||||||
|
|
||||||
<EditorProvider
|
<EditorProvider
|
||||||
editable={false}
|
editable={false}
|
||||||
|
|||||||
@@ -52,7 +52,34 @@
|
|||||||
|
|
||||||
h1,
|
h1,
|
||||||
h2,
|
h2,
|
||||||
h3,
|
h3 {
|
||||||
|
letter-spacing: -0.01em;
|
||||||
|
line-height: 1.2;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 strong,
|
||||||
|
h2 strong,
|
||||||
|
h3 strong {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 1.875rem;
|
||||||
|
margin-top: 1.875rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
margin-top: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
margin-top: 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
h4,
|
h4,
|
||||||
h5,
|
h5,
|
||||||
h6 {
|
h6 {
|
||||||
@@ -243,3 +270,10 @@
|
|||||||
.actionIconGroup {
|
.actionIconGroup {
|
||||||
background: var(--mantine-color-body);
|
background: var(--mantine-color-body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.page-title .ProseMirror h1 {
|
||||||
|
font-size: 2.5rem;
|
||||||
|
font-weight: 700;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0.75em;
|
||||||
|
}
|
||||||
|
|||||||
@@ -244,6 +244,7 @@ export function TitleEditor({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<div className="page-title">
|
||||||
<EditorContent
|
<EditorContent
|
||||||
editor={titleEditor}
|
editor={titleEditor}
|
||||||
onKeyDown={(event) => {
|
onKeyDown={(event) => {
|
||||||
@@ -254,5 +255,6 @@ export function TitleEditor({
|
|||||||
handleTitleKeyDown(event);
|
handleTitleKeyDown(event);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user