You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made the code change the preview part of the block, but then using the left side of the block will not work correctly if the css is changed. I'm not sure how this is supposed to work.
The text was updated successfully, but these errors were encountered:
That would be the expected behavior. If there's custom css code overriding the widgets, the widgets no longer take effect. But deleting the custom css code should make them active again.
Okay. For this would it make sense to have separate event handlers for each of the code sections because if the javascript is edited would that mean the admin block wouldn't work as well. Also I have created the read only sections of the code and html should be ignored, correct?
That's right, HTML should be ignored. Same with the read-only sections of CSS and JS.
Adding custom CSS or JS shouldn't affect the admin block directly. Instead, custom CSS should be appended to the block's style scoped element (creating the style scoped if it doesn't exist yet). So the custom CSS works in addition to the widget styles, and can override them as well. Similarly, the custom JS would be appended to the script tag (again creating it if it doesn't exist).
I don't know if it makes sense to have different event handlers, but it would to get the CSS part working first. There will be some tricky aspects of previewing custom JS that we may or may not want to take on (i.e., infinite loops, resetting to original state, etc.) CSS will be simpler.
I made the code change the preview part of the block, but then using the left side of the block will not work correctly if the css is changed. I'm not sure how this is supposed to work.
The text was updated successfully, but these errors were encountered: