mirror of
https://github.com/TriliumNext/Trilium.git
synced 2025-12-10 03:53:37 -06:00
fix(server): note type not changed for webview template (closes #7557)
This commit is contained in:
parent
0d0448d86b
commit
3ee8e7b755
@ -102,7 +102,7 @@ eventService.subscribe(eventService.ENTITY_CREATED, ({ entityName, entity }) =>
|
||||
const content = note.getContent();
|
||||
|
||||
if (
|
||||
["text", "code", "mermaid", "canvas", "relationMap", "mindMap"].includes(note.type) &&
|
||||
["text", "code", "mermaid", "canvas", "relationMap", "mindMap", "webView"].includes(note.type) &&
|
||||
typeof content === "string" &&
|
||||
// if the note has already content we're not going to overwrite it with template's one
|
||||
(!content || content.trim().length === 0) &&
|
||||
|
||||
@ -131,7 +131,7 @@ export function getContentDisposition(filename: string) {
|
||||
}
|
||||
|
||||
// render and book are string note in the sense that they are expected to contain empty string
|
||||
const STRING_NOTE_TYPES = new Set(["text", "code", "relationMap", "search", "render", "book", "mermaid", "canvas"]);
|
||||
const STRING_NOTE_TYPES = new Set(["text", "code", "relationMap", "search", "render", "book", "mermaid", "canvas", "webView"]);
|
||||
const STRING_MIME_TYPES = new Set(["application/javascript", "application/x-javascript", "application/json", "application/x-sql", "image/svg+xml"]);
|
||||
|
||||
export function isStringNote(type: string | undefined, mime: string) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user