SilverBullet pivot to become an offline-first PWA (#403)

This commit is contained in:
Zef Hemel
2023-05-23 20:53:53 +02:00
committed by GitHub
parent b256269897
commit 5f484bed57
389 changed files with 4484 additions and 291129 deletions
+2 -1
View File
@@ -1,5 +1,4 @@
import { EditorView, ViewPlugin, ViewUpdate } from "../deps.ts";
import { safeRun } from "../../plugos/util.ts";
import { maximumAttachmentSize } from "../../common/types.ts";
import { Editor } from "../editor.tsx";
@@ -11,6 +10,7 @@ import {
tables,
taskListItems,
} from "https://cdn.skypack.dev/@joplin/turndown-plugin-gfm@1.0.45";
import { safeRun } from "../../common/util.ts";
const turndownService = new TurndownService({
hr: "---",
codeBlockStyle: "fenced",
@@ -138,6 +138,7 @@ export function attachmentExtension(editor: Editor) {
async function processFileTransfer(payload: File[]) {
const data = await payload[0].arrayBuffer();
// data.byteLength > maximumAttachmentSize;
await saveFile(data!, payload[0].name, payload[0].type);
}