Files
2024_WEBSITE_fipf/plugins/fipfcard_plugin/js/image_editor.js
asus 04c4ea31d5 - moving ajax script outside plugin class, as a js file
- wip trying to use the wordpress image editor
2024-02-19 00:46:03 +01:00

20 lines
523 B
JavaScript

console.log("---------------inside image_editor.js--------------");
const edit_image_button = document.getElementById('edit_image');
const image_id_field = document.getElementById('image_id');
edit_image_button.addEventListener('click', () => {
const image_id = image_id_field.value;
PLGNTLS_ajax("postid", image_id, 'image_editor')
.then((response) => response.json())
.then((data) => {
console.log("data: ");
console.log(data);
})
.catch((error) => {
console.log("error: ");
console.log(error);
});
});