mobile improvements
This commit is contained in:
@@ -1452,7 +1452,7 @@ export default function TextEditor(props: TextEditorProps) {
|
|||||||
ref={containerRef}
|
ref={containerRef}
|
||||||
class="border-surface2 text-text w-full max-w-full overflow-hidden rounded-md border px-4 py-2"
|
class="border-surface2 text-text w-full max-w-full overflow-hidden rounded-md border px-4 py-2"
|
||||||
classList={{
|
classList={{
|
||||||
"fixed inset-0 z-100 m-0 h-screen max-h-screen rounded-none flex flex-col":
|
"fixed inset-0 z-100 m-0 h-screen max-h-screen rounded-none flex flex-col overflow-hidden!":
|
||||||
isFullscreen(),
|
isFullscreen(),
|
||||||
"bg-base": isFullscreen()
|
"bg-base": isFullscreen()
|
||||||
}}
|
}}
|
||||||
@@ -1772,15 +1772,36 @@ export default function TextEditor(props: TextEditorProps) {
|
|||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
|
|
||||||
{/* Main Toolbar - Pinned at top in fullscreen */}
|
{/* Main Toolbar - Fixed at top always */}
|
||||||
<div
|
<div
|
||||||
id="main-toolbar"
|
id="main-toolbar"
|
||||||
class="border-surface2 bg-base border-b"
|
class="border-surface2 bg-base sticky top-0 z-[105] border-b"
|
||||||
classList={{
|
classList={{
|
||||||
"sticky top-0 z-[105]": isFullscreen()
|
"flex-none": isFullscreen()
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div class="flex flex-wrap gap-1 pb-2">
|
<div class="flex flex-wrap gap-1 pb-2">
|
||||||
|
{/* Undo/Redo buttons - critical for mobile */}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => instance().chain().focus().undo().run()}
|
||||||
|
disabled={!instance().can().undo()}
|
||||||
|
class="hover:bg-surface1 touch-manipulation rounded px-2 py-1 text-xs select-none disabled:cursor-not-allowed disabled:opacity-30"
|
||||||
|
title="Undo (Cmd/Ctrl+Z)"
|
||||||
|
>
|
||||||
|
↶
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={() => instance().chain().focus().redo().run()}
|
||||||
|
disabled={!instance().can().redo()}
|
||||||
|
class="hover:bg-surface1 touch-manipulation rounded px-2 py-1 text-xs select-none disabled:cursor-not-allowed disabled:opacity-30"
|
||||||
|
title="Redo (Cmd/Ctrl+Shift+Z)"
|
||||||
|
>
|
||||||
|
↷
|
||||||
|
</button>
|
||||||
|
<div class="border-surface2 mx-1 border-l"></div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
@@ -2220,10 +2241,10 @@ export default function TextEditor(props: TextEditorProps) {
|
|||||||
|
|
||||||
<div
|
<div
|
||||||
ref={editorRef}
|
ref={editorRef}
|
||||||
class="prose prose-sm prose-invert sm:prose-base md:prose-xl lg:prose-xl xl:prose-2xl mx-auto max-w-full overflow-scroll transition-all duration-300 focus:outline-none"
|
class="prose prose-sm prose-invert sm:prose-base md:prose-xl lg:prose-xl xl:prose-2xl mx-auto max-w-full transition-all duration-300 focus:outline-none"
|
||||||
classList={{
|
classList={{
|
||||||
"h-[80dvh]": !isFullscreen(),
|
"h-[80dvh] overflow-scroll": !isFullscreen(),
|
||||||
"flex-1 h-full": isFullscreen()
|
"flex-1 h-full overflow-y-auto": isFullscreen()
|
||||||
}}
|
}}
|
||||||
style={{
|
style={{
|
||||||
"padding-bottom": keyboardVisible() ? `${keyboardHeight()}px` : "1rem"
|
"padding-bottom": keyboardVisible() ? `${keyboardHeight()}px` : "1rem"
|
||||||
|
|||||||
@@ -7,7 +7,10 @@ export default createHandler(() => (
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta
|
||||||
|
name="viewport"
|
||||||
|
content="width=device-width, initial-scale=1, maximum-scale=1"
|
||||||
|
/>
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
{assets}
|
{assets}
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Reference in New Issue
Block a user