Add support to allow text/html while we fetch internal HTML resource over popup

Created on 3 August 2023, over 1 year ago

Add support to text/html as currently "colorbox" are only supported for images.

I had feature in my website that fetches a HTML content to display over the popup. Please note this cannot be achieved using colorbox load's default configuration. As I had a custom callback that returns an iFrame html to load specific video content from external website. This feature was working in the earlier version of the module.

After the module upgrade this got broken as the AJAX callback triggered has the request headers set to Accept: image/png.

Proposed resolution

This module needs a configuration for the user to set between image support, html support. Currently the extended parameter is
set to photo: true in line number 34 at js/colobox.js. This needs to be modified based on user configuration value in the settings page.

Remaining tasks

  1. Add a setting page
  2. Set default value to "photo" so that extend params value is set to true for photos
  3. Add additional options in the settings page to allow HTML tags
  4. When it set to HTML, modify the extend params in colorbox.js to allow HTML
  5. Add support to receive user set of tags and attributes instead of hardcoding at ALLOWED_TAGS and ALLOWED_ATTR in purifyConfig variable
Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇮🇳India anishnirmal

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024