PlugOS refactor and other tweaks (#631)

* Prep for in-process plug loading (e.g. for CF workers, Deno Deploy)
* Prototype of fixed in-process loading plugs
* Fix: buttons not to scroll with content
* Better positioning of modal especially on mobile
* Move query caching outside query
* Fix annoying mouse behavior when filter box appears
* Page navigator search tweaks
This commit is contained in:
Zef Hemel
2024-01-15 16:43:12 +01:00
committed by GitHub
parent a9eb252658
commit a2dbf7b3db
65 changed files with 591 additions and 617 deletions
+6 -6
View File
@@ -9,16 +9,16 @@ import { renderMarkdownToHtml } from "./markdown_render.ts";
Deno.test("Markdown render", async () => {
const system = new System<any>("server");
await system.load(
new URL("../../dist_plug_bundle/_plug/editor.plug.js", import.meta.url),
"editor",
0,
createSandbox,
createSandbox(
new URL("../../dist_plug_bundle/_plug/editor.plug.js", import.meta.url),
),
);
await system.load(
new URL("../../dist_plug_bundle/_plug/tasks.plug.js", import.meta.url),
"tasks",
0,
createSandbox,
createSandbox(
new URL("../../dist_plug_bundle/_plug/tasks.plug.js", import.meta.url),
),
);
const lang = buildMarkdown(loadMarkdownExtensions(system));
const testFile = Deno.readTextFileSync(
+2 -2
View File
@@ -11,8 +11,8 @@ export async function updateMarkdownPreview() {
const text = await editor.getText();
const mdTree = await markdown.parseMarkdown(text);
// const cleanMd = await cleanMarkdown(text);
const css = await asset.readAsset("assets/preview.css");
const js = await asset.readAsset("assets/preview.js");
const css = await asset.readAsset("markdown", "assets/preview.css");
const js = await asset.readAsset("markdown", "assets/preview.js");
await expandCodeWidgets(mdTree, currentPage);
const html = renderMarkdownToHtml(mdTree, {