Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

fix(web): center document block in focus mode to balance layout

tianma-if9f68c16c2671
diff --git a/apps/web/src/components/EditorPane.tsx b/apps/web/src/components/EditorPane.tsx
index 2401dd5d..345e0984 100644
--- a/apps/web/src/components/EditorPane.tsx
+++ b/apps/web/src/components/EditorPane.tsx
@@ -2976,8 +2976,22 @@ const RichEditorPane = ({
useMobilePlainTextEditor ? "overflow-visible" : "overflow-y-auto"
)}
>
- <div className="flex min-h-full items-start w-full gap-8 px-6 py-6 sm:px-10">
- <div className="min-w-0 flex-1 max-w-[var(--editor-content-max-width,880px)]">
+ <div
+ className={cn(
+ "flex min-h-full items-start gap-8 px-6 py-6 sm:px-10 transition-all duration-200",
+ desktopFocusMode
+ ? "mx-auto w-full max-w-[1400px] justify-center"
+ : "w-full justify-start"
+ )}
+ >
+ <div
+ className={cn(
+ "min-w-0 flex-1 transition-[max-width] duration-200",
+ desktopFocusMode
+ ? "max-w-[960px]"
+ : "max-w-[var(--editor-content-max-width,880px)]"
+ )}
+ >
{useMobilePlainTextEditor ? (
<>
<textarea
diff --git a/apps/web/src/styles/globals.css b/apps/web/src/styles/globals.css
index fdf3d877..f032a29d 100644
--- a/apps/web/src/styles/globals.css
+++ b/apps/web/src/styles/globals.css
@@ -176,7 +176,7 @@ textarea {
.ProseMirror {
width: 100%;
- max-width: var(--editor-content-max-width, 880px);
+ max-width: 100%;
margin: 0;
color: #000;
font-size: var(--editor-body-font-size);