Merge pull request #256 from one-some/united

Don't paste rich text
This commit is contained in:
henk717
2023-01-11 22:59:52 +01:00
committed by GitHub

View File

@@ -7280,4 +7280,15 @@ async function screenshot_selection(summonEvent) {
let endDebt = totalText.indexOf(selectionContent) + selectionContent.length;
await showScreenshotWizard(actionComposition, startDebt=startDebt, endDebt=endDebt, totalText);
}
}
$el("#gamescreen").addEventListener("paste", function(event) {
// Get rid of rich text, it messes with actions. Not a great fix since it
// relies on execCommand but it'll have to do
event.preventDefault();
document.execCommand(
"insertHTML",
false,
event.clipboardData.getData("text/plain")
);
});