[wp-trac] [WordPress Trac] #61351: Simplify the block bindings HTML replacement logic

WordPress Trac noreply at wordpress.org
Mon Jun 3 07:36:00 UTC 2024


#61351: Simplify the block bindings HTML replacement logic
-----------------------------+-----------------------------
 Reporter:  santosguillamot  |      Owner:  (none)
     Type:  enhancement      |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  General          |    Version:
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 Gutenberg PRs:
 - https://github.com/WordPress/gutenberg/pull/61236
 - https://github.com/WordPress/gutenberg/pull/61660

 Proposal to change the block bindings HTML replacement logic to use a
 hardcoded list of selectors based on the block and a regex to substitute
 the inner content.

 The existing logic is too complex because the HTML API doesn't support CSS
 selectors yet and it doesn't have an official way to modify the inner
 HTML. This makes it difficult to understand, iterate on it and add new
 functionalities.

 As it will be solved in the future once the HTML API is ready, I believe
 it is better to keep a simple hardcoded version that is easier to
 understand and iterate on.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61351>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list