Dateien nach "js" hochladen
This commit is contained in:
16
js/classic-editor-shortcodes.js
Normal file
16
js/classic-editor-shortcodes.js
Normal 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.");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user