Better handling of formatting in pasted text

This commit is contained in:
Scott Nonnenberg
2023-05-23 15:00:05 -07:00
committed by GitHub
parent d012779e87
commit a31cf5645e
12 changed files with 105 additions and 43 deletions

View File

@@ -188,6 +188,7 @@ import { setBatchingStrategy } from './util/messageBatcher';
import { parseRemoteClientExpiration } from './util/parseRemoteClientExpiration';
import { makeLookup } from './util/makeLookup';
import { addGlobalKeyboardShortcuts } from './services/addGlobalKeyboardShortcuts';
import { handleCopyEvent } from './quill/signal-clipboard/util';
export function isOverHourIntoPast(timestamp: number): boolean {
return isNumber(timestamp) && isOlderThan(timestamp, HOUR);
@@ -550,6 +551,9 @@ export async function startApp(): Promise<void> {
false
);
// Intercept clipboard copies to add our custom text/signal data
document.addEventListener('copy', handleCopyEvent);
startInteractionMode();
// We add this to window here because the default Node context is erased at the end