I know PHP well enough to have customized or written from scratch several dozen themes. I copied your exact code. The new element is added on the frontend, but it does not impact the editor in any way. Tested on 1.12 and 2.0.
Edit: I see the file on Github uses bricks/element/render_attributes, which does render in the editor. Unfortunately, changing the value does not trigger the element to re-render, so I’m still stuck.
you need to spend some time to read how custom elements are made because registering the custom controls are the exacly same how we make custom elements
my recommendation would be to make custom elements first understand how controls works and then try adding controls to the native bricks elements…etc
you still dont told anything about what you are trying to do, why not make your own custom elements or your custom components
I feel like you just wasting time on something very edge case that only you want
you need to spend some time to read how custom elements are made because registering the custom controls are the exacly same how we make custom elements
I already read those articles. The documentation fails to mention the exceptions when the filters are not run (such as nav menus and text/headings that are rendered as contenteditable with render_builder()).
The fact remains that the code you posted on May 14 as “ok found the issue and solution this works well” does not render in the builder. I’m happy it works for your needs, but I can’t imagine when that would be useful to most people searching this question.
I’ll update this if I do find a straight-forward, consistent method for altering the HTML of any given element, but after a lot of digging and experimentation, to do something simple like toggle a class name based on a custom control value or alter some other HTML (and have that visible in the builder), shockingly, I would need to create a number of custom elements to replace those that are built in, as filters are insufficient. I will post this as a Feature Request.