Leere Textblöcke anklickbar, Startseiten-Slider nach Durchklicken repariert
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 4m6s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 4m23s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 4m9s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 3m59s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 5m16s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 5m27s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 5m35s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 5m9s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m15s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 4m6s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 4m23s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 4m9s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 3m59s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 5m16s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 5m27s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 5m35s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 5m9s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m15s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
499581d277
commit
1a54e0c215
101 changed files with 433 additions and 421 deletions
|
|
@ -66,6 +66,9 @@ watch(() => props.modelValue, (value) => {
|
|||
|
||||
onBeforeUnmount(() => editor.value?.destroy());
|
||||
|
||||
// Klick neben den Text (z. B. in einen leeren Block) setzt den Cursor ans Ende
|
||||
defineExpose({ focus: () => editor.value?.chain().focus('end').run() });
|
||||
|
||||
// Link bearbeiten
|
||||
const linkOpen = ref(false);
|
||||
const linkUrl = ref('');
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { defineAsyncComponent, inject } from 'vue';
|
||||
import { defineAsyncComponent, inject, ref } from 'vue';
|
||||
|
||||
defineProps({ block: { type: Object, required: true } });
|
||||
|
||||
|
|
@ -7,9 +7,18 @@ const editing = inject('pagebuilder:editing', false);
|
|||
|
||||
// Der Editor (TipTap) wird nur im Pagebuilder geladen, nicht beim Lesen.
|
||||
const RichTextEditor = defineAsyncComponent(() => import('@/components/RichTextEditor.vue'));
|
||||
const editorRef = ref(null);
|
||||
|
||||
// Auch ein leerer Block braucht eine Fläche zum Hineinklicken – die Werkzeugleiste
|
||||
// des Blocks liegt sonst über der einzigen Zeile.
|
||||
function focusEditor(event) {
|
||||
if (!event.target.closest('.ProseMirror, [role="toolbar"]')) editorRef.value?.focus();
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<RichTextEditor v-if="editing" v-model="block.data.html" placeholder="Text eingeben …" />
|
||||
<div v-if="editing" class="min-h-16 cursor-text pt-3 [&_.tiptap]:min-h-10" @click="focusEditor">
|
||||
<RichTextEditor ref="editorRef" v-model="block.data.html" placeholder="Text eingeben …" />
|
||||
</div>
|
||||
<div v-else class="prose prose-neutral max-w-none prose-headings:tracking-tight prose-img:rounded-lg" v-html="block.data.html" />
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue