{
if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === 's') {
@@ -122,14 +149,15 @@
{#if html !== null}
{#key revision}
attach(event.detail)}
/>
{/key}
diff --git a/src/lib/components/common/RichTextInput/Image/image.ts b/src/lib/components/common/RichTextInput/Image/image.ts
index 0d1a8dc2ce..1e83a80ab6 100644
--- a/src/lib/components/common/RichTextInput/Image/image.ts
+++ b/src/lib/components/common/RichTextInput/Image/image.ts
@@ -123,12 +123,6 @@ export const Image = Node.create({
addNodeView() {
return ({ node, editor }) => {
- const domImg = document.createElement('img');
- domImg.setAttribute('src', node.attrs.src || '');
- domImg.setAttribute('alt', node.attrs.alt || '');
- domImg.setAttribute('title', node.attrs.title || '');
-
- const container = document.createElement('div');
const img = document.createElement('img');
const fileId = node.attrs.src.replace('data://', '');
@@ -164,11 +158,8 @@ export const Image = Node.create({
}
});
- container.append(img);
- return {
- dom: img,
- contentDOM: domImg
- };
+ // Images are leaf nodes; a detached contentDOM breaks cursor positioning.
+ return { dom: img };
};
},
diff --git a/src/lib/utils/safeImageUrl.ts b/src/lib/utils/safeImageUrl.ts
index c81412294c..f563d02444 100644
--- a/src/lib/utils/safeImageUrl.ts
+++ b/src/lib/utils/safeImageUrl.ts
@@ -12,6 +12,7 @@ const PLACEHOLDER_IMAGE = '/favicon.png';
* Allowed patterns:
* - Relative paths (starting with '/')
* - data:image/* URIs
+ * - Blob URLs created on this origin
* - Same-origin URLs (starting with WEBUI_BASE_URL)
* - Gravatar URLs (https://www.gravatar.com/avatar/)
* - External HTTP(S) URLs when allowExternal is true
@@ -27,6 +28,7 @@ export function safeImageUrl(url: string, allowExternal = false): string {
if (
(WEBUI_BASE_URL && url.startsWith(WEBUI_BASE_URL)) ||
url.startsWith('https://www.gravatar.com/avatar/') ||
+ (typeof location !== 'undefined' && url.startsWith(`blob:${location.origin}/`)) ||
(allowExternal && /^https?:\/\//i.test(url)) ||
url.startsWith('data:') ||
url.startsWith('/')
diff --git a/static/audio/notification.mp3 b/static/audio/notification.mp3
deleted file mode 100644
index c41d02ca0c..0000000000
Binary files a/static/audio/notification.mp3 and /dev/null differ