mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 10:22:29 +08:00
feat(in_app_help): support webviews
This commit is contained in:
parent
9299f90b85
commit
ecb2c53c6f
@ -44,6 +44,15 @@ function parseNoteMeta(noteMeta: NoteMeta, docNameRoot: string): HiddenSubtreeIt
|
||||
for (const attribute of noteMeta.attributes ?? []) {
|
||||
if (attribute.name === "iconClass") {
|
||||
iconClass = attribute.value;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (attribute.name === "webViewSrc") {
|
||||
item.attributes?.push({
|
||||
type: "label",
|
||||
name: attribute.name,
|
||||
value: attribute.value
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,6 +73,11 @@ function parseNoteMeta(noteMeta: NoteMeta, docNameRoot: string): HiddenSubtreeIt
|
||||
});
|
||||
}
|
||||
|
||||
// Handle web views
|
||||
if (noteMeta.type === "webView") {
|
||||
item.type = "webView";
|
||||
}
|
||||
|
||||
// Handle children
|
||||
if (noteMeta.children) {
|
||||
const children: HiddenSubtreeItem[] = [];
|
||||
|
@ -1,3 +1,4 @@
|
||||
import type { NoteType } from "../../becca/entities/rows.js";
|
||||
import type AttachmentMeta from "./attachment_meta.js";
|
||||
import type AttributeMeta from "./attribute_meta.js";
|
||||
|
||||
@ -15,7 +16,7 @@ export default interface NoteMeta {
|
||||
notePosition?: number;
|
||||
prefix?: string | null;
|
||||
isExpanded?: boolean;
|
||||
type?: string;
|
||||
type?: NoteType;
|
||||
mime?: string;
|
||||
/** 'html' or 'markdown', applicable to text notes only */
|
||||
format?: "html" | "markdown";
|
||||
|
Loading…
x
Reference in New Issue
Block a user