Open CreativeDive opened 5 years ago
Hey @CreativeDive Martin
Thanks for creating the issue! A lot of time has passed. Is this issue still valid?
I will ping @ntsekouras Nik so he becomes aware of this issue. As he might have a comment. Thanks!
This is still an issue, I also am experiencing it
I am still experiencing this issue @paaljoachim @ntsekouras
However, in case of the "Custom HTML block" preview, the iframe does not use the "editor-styles-wrapper" parent class and specific styles adjustments has no effect to the previewed custom HTML inside the block editor.
As per my understanding, it's a HTML block, I can write my own HTML block with a style
attribute to apply custom styling as shown in the screenshot.
Screenshots
Custom HTML
Preview of the block:
I'm not sure whether this requires any code level changes or not!? cc @paaljoachim @ntsekouras
I will ping Isabell, Dan and George @tellthemachines @talldan @Mamaduka as they might have some thoughts on this issue.
If we use the preview of the "Custom HTML block", all styles which are included by
add_editor_style();
will loaded inside the preview iframe.What happened?
My main style.css is included with
add_editor_style();
to get the same result for the block editor as in the themes frontend view.In some cases a specific reset is required, because I don't want to show the custom added body background image of the entire website inside the block editor. So I'm doing that:
However, in case of the "Custom HTML block" preview, the iframe does not use the "editor-styles-wrapper" parent class and specific styles adjustments has no effect to the previewed custom HTML inside the block editor.
Or if we want to add style customization specifically for the block editor by using the
".editor-styles-wrapper"
class as selector, this has no effect to the custom HTML block preview inside the iframe.How we can handle this issue?