nexcoding / image-manager-ci4
There is no license information available for the latest version (0.0.1) of this package.
0.0.1
2023-08-10 22:10 UTC
This package is not auto-updated.
Last update: 2025-01-11 04:36:51 UTC
README
The CodeIgniter Image Manager Package provides a convenient way to manage and handle image uploads and selections in your CodeIgniter 4 projects.
Features
- Upload images with ease.
- List uploaded images.
- Select images from the list.
Installation
You can install this package via Composer:
composer require nexcoding/image-manager-ci4Create new report <script> document.addEventListener("DOMContentLoaded", function () { const openModalButtons = document.querySelectorAll('[data-media-ci4-library]'); const myModal = new bootstrap.Modal(document.getElementById('modalId')); openModalButtons.forEach(button => { button.addEventListener('click', function () { const targetInputId = button.getAttribute('data-media-ci4-target-input-id'); myModal.show(); myModal._element.setAttribute('data-target-input-id', targetInputId); }); }); window.addEventListener('message', function(event) { if (event.data.type === 'imageSelected') { const selectedImage = event.data.image; const targetInputId = myModal._element.getAttribute('data-target-input-id'); document.getElementById(targetInputId).value = selectedImage; myModal.hide(); } }); }); </script>