From 178e3d585b9c95c7afc0ca5f887b27b7dec70b8c Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Fri, 6 Mar 2026 22:36:05 -0500 Subject: [PATCH] Bug 1995468 - Support URL pasting in markdown editor --- js/text-editor.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/js/text-editor.js b/js/text-editor.js index 6ca1d638a2..d7c7d54da1 100644 --- a/js/text-editor.js +++ b/js/text-editor.js @@ -78,6 +78,10 @@ Bugzilla.TextEditor = class TextEditor { this.textareaOnInput(event); }); + this.$textarea.addEventListener('paste', (/** @type {ClipboardEvent} */ event) => { + this.textareaOnPaste(event); + }); + this.togglePreviewTab(); if (this.useMarkdown) { @@ -284,6 +288,28 @@ Bugzilla.TextEditor = class TextEditor { this.togglePreviewTab(); } + /** + * Called whenever content is pasted to the `