blah blah

This commit is contained in:
Donavon McDowell 2024-12-19 16:56:20 -07:00
parent 70254cbf2a
commit 1a52779ec3
2 changed files with 8 additions and 4 deletions

View File

@ -31,7 +31,10 @@
extensions: [ extensions: [
StarterKit, StarterKit,
Underline, Underline,
Image.configure({ block: true }), Image.configure({
inline: true,
allowBase64: true,
}),
Dropcursor, Dropcursor,
CodeBlock.configure({ CodeBlock.configure({
exitOnTripleEnter: true, exitOnTripleEnter: true,
@ -86,7 +89,7 @@
}), }),
], ],
// place the cursor in the editor after initialization // place the cursor in the editor after initialization
autofocus: true, autofocus: false,
// make the text editable (but thats the default anyway) // make the text editable (but thats the default anyway)
editable: true, editable: true,
// disable the loading of the default CSS (which is not much anyway) // disable the loading of the default CSS (which is not much anyway)

View File

@ -1,6 +1,7 @@
<script> <script>
import { onMount } from 'svelte'; import { onMount } from 'svelte';
import { page } from "$app/stores" import { page } from "$app/stores"
import { PUBLIC_BASE_URL } from '$env/static/public';
//import { PUBLIC_BASE_URL } from '$env/static/public'; //import { PUBLIC_BASE_URL } from '$env/static/public';
//import { PUBLIC_BASE_URL } from '$env/dynamic/private' //import { PUBLIC_BASE_URL } from '$env/dynamic/private'
@ -26,7 +27,7 @@
// Function to simulate search API call // Function to simulate search API call
async function searchDocuments(query) { async function searchDocuments(query) {
try { try {
const res = await fetch(`https://docucenter.mpe.ca/api/document/search?query=${query}`); const res = await fetch(`${PUBLIC_BASE_URL}/api/document/search?query=${query}`);
const data = await res.json(); const data = await res.json();
if (data.length > 0) { if (data.length > 0) {
@ -43,7 +44,7 @@
// Function to fetch all documents from the API // Function to fetch all documents from the API
async function getAllDocuments() { async function getAllDocuments() {
try { try {
const res = await fetch(`https://docucenter.mpe.ca/api/document`); const res = await fetch(`${PUBLIC_BASE_URL}/api/document`);
if (!res.ok) { if (!res.ok) {
throw new Error(`Failed to fetch documents: ${res.statusText}`); throw new Error(`Failed to fetch documents: ${res.statusText}`);