Awesome frontmatter (#617)

Live Frontmatter Templates
This commit is contained in:
Zef Hemel
2024-01-04 20:08:12 +01:00
committed by GitHub
parent 9040993232
commit 91027af5fe
53 changed files with 646 additions and 342 deletions
+5 -1
View File
@@ -71,11 +71,15 @@ export function fencedCodePlugin(editor: Client) {
);
});
const bodyText = lineStrings.slice(1, lineStrings.length - 1).join(
"\n",
);
const widget = renderMode === "markdown"
? new MarkdownWidget(
from + lineStrings[0].length + 1,
editor,
lineStrings.slice(1, lineStrings.length - 1).join("\n"),
`widget:${editor.currentPage}:${bodyText}`,
bodyText,
codeWidgetCallback,
"sb-markdown-widget",
)