1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Desktop: Add new beta Markdown editor based on CodeMirror 6 (#8793)

This commit is contained in:
Henry Heino
2023-09-21 01:12:40 -07:00
committed by GitHub
parent c3971ff226
commit 84c6de9b56
70 changed files with 4201 additions and 1306 deletions

View File

@@ -0,0 +1,16 @@
// Prevents the CodeMirror error "getClientRects is undefined".
// See https://github.com/jsdom/jsdom/issues/3002#issue-652790925
document.createRange = () => {
const range = new Range();
range.getBoundingClientRect = jest.fn();
range.getClientRects = () => {
return {
length: 0,
item: () => null,
[Symbol.iterator]: jest.fn(),
};
};
return range;
};