mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-02-23 06:57:44 +01:00
Fix an incorrect document.queryCommandSupported call
This commit is contained in:
parent
99d26c44e0
commit
fdbe730a1f
@ -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) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<script src="static/jquery-3.6.0.min.js"></script>
|
||||
<script src="static/socket.io.min.js"></script>
|
||||
<script src="static/application.js?ver=1.16.2i"></script>
|
||||
<script src="static/application.js?ver=1.16.2j"></script>
|
||||
<script src="static/bootstrap.min.js"></script>
|
||||
<script src="static/bootstrap-toggle.min.js"></script>
|
||||
<script src="static/rangy-core.min.js"></script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user