Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,15 @@ export function useSpecificEditorSettings() {
}, [ mergedConfig ] );

const defaultEditorSettings = useMemo( () => {
// Preserve non-global styles from settings.styles (e.g., editor styles from add_editor_style)
const nonGlobalStyles = ( settings?.styles ?? [] ).filter(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note there are some concerns with the current architecture.

This PR only proposes to get things working for users while those concerns are addressed. They appear to require non-trivial refactors.

See: #73952 (comment)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I should add some comments to explain why we've had to do all this, including the bug fix in #73952

( style ) => ! style.isGlobalStyles
);

return {
...settings,
styles: [
...nonGlobalStyles,
...globalStyles,
{
// Forming a "block formatting context" to prevent margin collapsing.
Expand Down
Loading