mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-18 16:32:33 +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 ?? []) {
|
for (const attribute of noteMeta.attributes ?? []) {
|
||||||
if (attribute.name === "iconClass") {
|
if (attribute.name === "iconClass") {
|
||||||
iconClass = attribute.value;
|
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
|
// Handle children
|
||||||
if (noteMeta.children) {
|
if (noteMeta.children) {
|
||||||
const children: HiddenSubtreeItem[] = [];
|
const children: HiddenSubtreeItem[] = [];
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import type { NoteType } from "../../becca/entities/rows.js";
|
||||||
import type AttachmentMeta from "./attachment_meta.js";
|
import type AttachmentMeta from "./attachment_meta.js";
|
||||||
import type AttributeMeta from "./attribute_meta.js";
|
import type AttributeMeta from "./attribute_meta.js";
|
||||||
|
|
||||||
@ -15,7 +16,7 @@ export default interface NoteMeta {
|
|||||||
notePosition?: number;
|
notePosition?: number;
|
||||||
prefix?: string | null;
|
prefix?: string | null;
|
||||||
isExpanded?: boolean;
|
isExpanded?: boolean;
|
||||||
type?: string;
|
type?: NoteType;
|
||||||
mime?: string;
|
mime?: string;
|
||||||
/** 'html' or 'markdown', applicable to text notes only */
|
/** 'html' or 'markdown', applicable to text notes only */
|
||||||
format?: "html" | "markdown";
|
format?: "html" | "markdown";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user