From 50dbe9a4e56bb4fb0c4f9b8a94efeea0dfacd7c5 Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Mon, 1 Sep 2025 00:35:28 +0200 Subject: [PATCH] trying to improve editing on long-tap Signed-off-by: Stephan Richter --- frontend/src/Components/LineEditor.svelte | 8 +++++++- frontend/src/Components/MarkdownEditor.svelte | 11 ++++++++++- web/src/main/resources/web/css/default.css | 17 +++++++++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/frontend/src/Components/LineEditor.svelte b/frontend/src/Components/LineEditor.svelte index 4e925c5..b360e70 100644 --- a/frontend/src/Components/LineEditor.svelte +++ b/frontend/src/Components/LineEditor.svelte @@ -44,6 +44,12 @@ } } + function oncontextmenu(evt){ + evt.preventDefault(); + evt.stopPropagation(); + return false; + } + function onmousedown(evt){ evt.preventDefault(); start = evt.timeStamp; @@ -85,5 +91,5 @@ {#if editable && editing} {:else} -{value} +{value} {/if} diff --git a/frontend/src/Components/MarkdownEditor.svelte b/frontend/src/Components/MarkdownEditor.svelte index f103dec..6274dbd 100644 --- a/frontend/src/Components/MarkdownEditor.svelte +++ b/frontend/src/Components/MarkdownEditor.svelte @@ -70,6 +70,13 @@ } } + + function oncontextmenu(evt){ + evt.preventDefault(); + evt.stopPropagation(); + return false; + } + function onmousedown(evt){ evt.preventDefault(); start = evt.timeStamp; @@ -108,7 +115,9 @@ } +
{#if editing} {/if} -{@html editValue.rendered} +{@html editValue.rendered} +
\ No newline at end of file diff --git a/web/src/main/resources/web/css/default.css b/web/src/main/resources/web/css/default.css index 351b311..4024f94 100644 --- a/web/src/main/resources/web/css/default.css +++ b/web/src/main/resources/web/css/default.css @@ -327,4 +327,21 @@ li > a > p:nth-child(1){ .time.record button.delete{ float: right; +} + +.markdown.editing{ + position: relative; +} + +.markdown.editing > *{ + width: 49%; +} + +.markdown.editing > *:nth-child(2){ + position: absolute; + right: 0; + top: 0; +} +table{ + width: 100vw; } \ No newline at end of file