mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 02:41:35 +01:00
Share styles and update props
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
import WebsiteEditor from "$lib/components/WebsiteEditor.svelte";
|
||||
import { ALLOWED_MIME_TYPES, handleImagePaste } from "$lib/utils";
|
||||
import SuccessOrError from "$lib/components/SuccessOrError.svelte";
|
||||
import type { ActionData, PageServerData } from "./$types";
|
||||
import type { ActionData, LayoutServerData, PageServerData } from "./$types";
|
||||
import Modal from "$lib/components/Modal.svelte";
|
||||
|
||||
const { data, form } = $props<{ data: PageServerData; form: ActionData }>();
|
||||
const { data, form }: { data: PageServerData & LayoutServerData; form: ActionData } = $props();
|
||||
|
||||
let previewContent = $state(data.home.main_content);
|
||||
let mainContentTextarea: HTMLTextAreaElement;
|
||||
@@ -19,7 +19,10 @@
|
||||
|
||||
const handlePaste = async (event: ClipboardEvent) => {
|
||||
const newContent = await handleImagePaste(event, data.API_BASE_PREFIX);
|
||||
previewContent = newContent;
|
||||
|
||||
if (newContent) {
|
||||
previewContent = newContent;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user