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

WordPress Trac noreply at wordpress.org
Mon Jun 3 16:12:18 UTC 2024


#61351: Simplify the block bindings HTML replacement logic
------------------------------+-----------------------
 Reporter:  santosguillamot   |       Owner:  audrasjb
     Type:  enhancement       |      Status:  closed
 Priority:  normal            |   Milestone:  6.6
Component:  Editor            |     Version:  6.5
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:
------------------------------+-----------------------
Changes (by audrasjb):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"58298" 58298]:
 {{{
 #!CommitTicketReference repository="" revision="58298"
 Editor: Simplify the block bindings HTML replacement logic until the HTML
 API is ready.

 This changeset modifies 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 previous logic was too complex because the HTML API
 does not support CSS selectors yet and it does not have an official way to
 modify the inner HTML. This made 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, it is
 better for now to keep a simple hardcoded version that is easier to
 understand and iterate on.

 Props santosguillamot, gziolo, petitphp.
 Fixes #61351.
 }}}

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


More information about the wp-trac mailing list