diff --git a/services/web/frontend/js/features/source-editor/extensions/visual/paste-html.ts b/services/web/frontend/js/features/source-editor/extensions/visual/paste-html.ts
index ffaea6e8b4..702a36e9cd 100644
--- a/services/web/frontend/js/features/source-editor/extensions/visual/paste-html.ts
+++ b/services/web/frontend/js/features/source-editor/extensions/visual/paste-html.ts
@@ -543,4 +543,9 @@ const selectors = [
element.nextElementSibling?.nodeName === 'P' && hasContent(element),
end: () => '\n\n',
}),
+ createSelector({
+ selector: 'blockquote',
+ start: () => `\n\n\\begin{quote}\n`,
+ end: () => `\n\\end{quote}\n\n`,
+ }),
]
diff --git a/services/web/test/frontend/features/source-editor/components/codemirror-editor-visual-paste-html.spec.tsx b/services/web/test/frontend/features/source-editor/components/codemirror-editor-visual-paste-html.spec.tsx
index 5cbfdcc3f5..32ebc48313 100644
--- a/services/web/test/frontend/features/source-editor/components/codemirror-editor-visual-paste-html.spec.tsx
+++ b/services/web/test/frontend/features/source-editor/components/codemirror-editor-visual-paste-html.spec.tsx
@@ -251,6 +251,25 @@ describe('
footest' + + const clipboardData = new DataTransfer() + clipboardData.setData('text/html', data) + cy.get('@content').trigger('paste', { clipboardData }) + + cy.get('@content').should('have.text', 'test foo test') + cy.get('.ol-cm-environment-quote').should('have.length', 5) + + cy.get('.cm-line').eq(2).click() + cy.get('@content').should( + 'have.text', + 'test \\begin{quote}foo\\end{quote} test' + ) + }) + it('handles pasted inline code', function () { mountEditor()