Added: HTML custom field editor#2721
Open
RabbiIslamRony wants to merge 2 commits intosovware:developmentfrom
Open
Added: HTML custom field editor#2721RabbiIslamRony wants to merge 2 commits intosovware:developmentfrom
RabbiIslamRony wants to merge 2 commits intosovware:developmentfrom
Conversation
…nd formatting Add full HTML custom-field editor support with media button, improve admin edit stability by preventing unnecessary field re-render on initial load, and align single-listing HTML rendering with editor formatting. Also streamline templates by removing inline CSS and redundant sanitization paths while keeping safe allowlisted output.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type
What kind of change does this PR introduce?
Description
This PR introduces and stabilizes HTML custom field behavior across Add Listing, Edit Listing, and Single Listing render paths.
It fixes an issue in the admin Edit Listing screen where the HTML editor initially loaded and then disappeared due to automatic listing field re-rendering.
It improves HTML content consistency between editor and frontend by refining sanitization and rendering flow, preserving formatting-related attributes, and ensuring media support within the HTML editor context.
Template files were also cleaned by removing unnecessary inline CSS and redundant logic. https://prnt.sc/u0EnQRCyynu-
Summary
Key Changes
templates/listing-form/custom-fields/html.php
templates/single/custom-fields/html.php
includes/fields/class-directorist-html-field.php
assets/src/js/admin/components/block-3.js
assets/js/admin-main.js
includes/asset-loader/init.php
Why This Change
Previously, HTML field content behaved inconsistently between the editor and frontend. The Edit Listing screen also experienced editor instability due to a second dynamic field render.
This update ensures predictable and consistent HTML field behavior without affecting existing field types.
Test Plan