mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Fix an incorrect document.queryCommandSupported call
This commit is contained in:
@ -1041,7 +1041,7 @@ function chunkOnPaste(event) {
|
||||
}
|
||||
// If possible, intercept paste events into the editor in order to always
|
||||
// paste as plaintext
|
||||
if(event.originalEvent.clipboardData && document.queryCommandSupported && document.execCommand && document.queryCommandSupported('insertText')) {
|
||||
if(event.originalEvent.clipboardData && document.queryCommandSupported && document.execCommand && document.queryCommandSupported('insertHTML')) {
|
||||
event.preventDefault();
|
||||
document.execCommand('insertHTML', false, event.originalEvent.clipboardData.getData('text/plain').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/(?=\r|\n)\r?\n?/g, '<br/>'));
|
||||
} else if (event.originalEvent.clipboardData) {
|
||||
|
Reference in New Issue
Block a user