mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 10:51:36 +01:00
Share styles and update props
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
import Modal from "$lib/components/Modal.svelte";
|
||||
import { handleImagePaste } from "$lib/utils";
|
||||
|
||||
const { data, form } = $props<{ data: PageServerData; form: ActionData }>();
|
||||
const { data, form }: { data: PageServerData; form: ActionData } = $props();
|
||||
|
||||
let previewContent = $state(data.article.main_content);
|
||||
let mainContentTextarea: HTMLTextAreaElement;
|
||||
@@ -20,7 +20,9 @@
|
||||
|
||||
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