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:
@@ -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(
|
||||
|
||||
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user