embedding support popup

This commit is contained in:
JeLuF
2023-06-30 08:41:15 +02:00
parent 7306ac0168
commit 75c57f646d
4 changed files with 137 additions and 0 deletions

View File

@ -997,6 +997,22 @@ async function getStorageData(key) {
});
}
function insertAtCursor(field, text) {
if (field.selectionStart || field.selectionStart == "0") {
var startPos = field.selectionStart
var endPos = field.selectionEnd
var before = field.value.substring(0, startPos)
var after = field.value.substring(endPos, field.value.length)
if (!before.endsWith(" ")) { before += " " }
if (!after.startsWith(" ")) { after = " "+after }
field.value = before + text + after
} else {
field.value += text
}
}
// indexedDB debug functions
async function getAllKeys() {
return openDB().then(db => {