In trying to putAfter the post editor is iframed, theThe presence of the metaframe becomes a blocking condition that prevents editor content from loading in the iframe and makes these benefits of the iframe unavailable:
- Isolate block and theme CSS from editor UI
- Accuracy of media queries and viewport-related CSS units
![图片[1]-WordPress 6.7 中的 “帖子编辑器 ”iframing 与元框-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024101906130956.png)
These benefits are important to support CSS reuse in the editor and front-end, as well as to simplify block and theme development. Even though metaframes exist, community members have been working to bring them into the post editor, but after theattempt(preceded by a clause of condition or reason) not untilrecognize How to adjust the interface to separate the meta box from the post content.
present .Split view implementedThis change supports simultaneous visibility of editor content and meta boxes. This change ensures a consistent WYSIWYG experience between the editor and the front-end view. Additionally, it makes metaframes easier to use than before and allows for intuitive referencing of any part of the post content when using any metaframe and vice versa.
![图片[2]-WordPress 6.7 中的 “帖子编辑器 ”iframing 与元框-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024101906152866.png)
Remaining exceptions for iframes
Currently, the last condition that prevents an iframe from always being used is whether any block uses itsapiVersion
Less than registered3
. However, even this condition may be removed in a future release, and if the site uses theGutenberg plugin and the block-based theme is active, it already has an exception.
Edge conditions and compatibility
Plugin developers adding metaframes should be aware of two things. First, metaframe containers now clip overflow elements, so if some of the popup UI (e.g. dropdown menus) extends upwards from the metaframe container, they will be cut off. However, if they are rendered to a part of the DOM outside of the container, this will not be an issue. Second, if your plugin also adds any rich text formatting and the editing UI is anchored to the text selection, then their implementation must be compatible with iframes. This is not a new requirement, but may be overlooked for plugins that only extend the post editor.
![图片[3]-WordPress 6.7 中的 “帖子编辑器 ”iframing 与元框-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024101906154680.png)
overflow clipping
To make sure this isn't a problem, you can either make any UI that resembles a popup window open down in the metaframe, or by rendering the popup window to a part of the DOM that isn't inside the metaframe container. For example, the latter is the default workaround for the and componentsPopover
(math.) genusDropdown
utilizationDropDownMenu
they (for inanimate objects)@wordpress/components
will ensure that the UI is not cropped even if it extends beyond the top of the metaframe container.
Rich Text Format UI Anchoring
If the plugin implements custom code to anchor or position the UI, then this may just be worrisome. If the plugin already uses theuseAnchor
come from (a place)@wordpress/rich-text
everything, then it should work fine. If not, see Gutenberg's ownLink Editor UIcomponent for a typical example of its usage.
![图片[4]-WordPress 6.7 中的 “帖子编辑器 ”iframing 与元框-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/10/2024101906162430.png)
Link to this article:https://www.361sale.com/en/21819The article is copyrighted and must be reproduced with attribution.
No comments