Skip to content

fix: initialize ajax html editor on listing type switch#2854

Merged
Armanul46 merged 2 commits into
sovware:developmentfrom
RabbiIslamRony:codex/fix-admin-html-editor-rendering
May 17, 2026
Merged

fix: initialize ajax html editor on listing type switch#2854
Armanul46 merged 2 commits into
sovware:developmentfrom
RabbiIslamRony:codex/fix-admin-html-editor-rendering

Conversation

@RabbiIslamRony
Copy link
Copy Markdown
Member

@RabbiIslamRony RabbiIslamRony commented May 17, 2026

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Security fix
  • Improvement
  • New Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Text changes
  • Other... Please describe: Added Codex/Claude agent context for repository workflow support.

Description

How to reproduce the issue or how to test the changes

  1. In wp-admin, open post-new.php?post_type=at_biz_dir or edit an existing at_biz_dir listing.
  2. Select a directory type that does not initially include an HTML custom field, then switch to a directory type that includes an HTML custom field.
  3. Confirm the HTML editor renders correctly: Add Media works, Visual mode shows the TinyMCE toolbar, Code mode shows QuickTags buttons, and no mce_SELRES_* text appears in the textarea.
  4. Switch repeatedly between directory types with and without HTML custom fields to confirm the editor remains stable after AJAX reloads.
  5. Confirm the included Node update and Codex/Claude agent context files are present for the updated development workflow.

Any linked issues

Fixes #

Checklist

Load the WordPress editor runtime on admin add/edit listing screens so AJAX-injected HTML custom fields can initialize even when the initial directory type does not include an editor.

Preserve server-rendered wp_editor markup during directory-type swaps and initialize TinyMCE/QuickTags against that markup instead of rebuilding it with wp.editor.initialize(). This keeps the expected Visual toolbar, Code toolbar, Add Media button, and prevents mce_SELRES bookmark markup from leaking into the textarea.

Bind the dynamic Visual/Code tabs for Directorist HTML fields and sync editor mode UI after switching.
@RabbiIslamRony RabbiIslamRony changed the title Codex/fix admin html editor rendering Fix: admin html editor rendering May 17, 2026
@RabbiIslamRony RabbiIslamRony changed the title Fix: admin html editor rendering fix: initialize ajax html editor on listing type switch May 17, 2026
@RabbiIslamRony RabbiIslamRony added this to the v8.7.2 milestone May 17, 2026
@Armanul46 Armanul46 merged commit 3a00b0e into sovware:development May 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants