Dateien nach "js" hochladen

This commit is contained in:
2025-03-06 21:37:43 +00:00
parent aa6ce3d6b3
commit 457b31c3db
3 changed files with 71 additions and 0 deletions

View File

@ -0,0 +1,16 @@
document.addEventListener("DOMContentLoaded", function () {
const btn = document.getElementById("wp_multi_insert_shortcode");
const dropdown = document.getElementById("wp_multi_shortcode_dropdown");
if (btn && dropdown) {
btn.addEventListener("click", function () {
const shortcode = dropdown.value;
if (shortcode) {
window.send_to_editor("[" + shortcode + "]");
} else {
alert("Bitte einen Shortcode auswählen.");
}
});
}
});