该插件尚未通过WordPress的最新3个主要版本进行测试。 当与较新版本的WordPress一起使用时,可能不再受到维护或支持,并且可能会存在兼容性问题。

Magic Block

描述

Magic Block registers a container block with the block editor. This block has settings for element (div, section, etc), ID, classname, inline style, and any other attribute (including data-*, and aria-*) via a custom attributes section.

Magic Block is designed for people who want full control over post HTML structure, or wish to use the editor to create complex layouts such as Flexbox, CSS Grid, Bootstrap, etc…

This block does not add any CSS styles that you, as a developer, do not provide. Rather, it allows you to easily contain other blocks in parent elements with an arbitrary ID or Class. You may then easily target these container elements by ID or Class in your theme’s stylesheets or through CSS plugins. For smaller customizations there is an inline style field which maps to the “style” HTML attribute for the container element.

In the editor view, each Magic Block has a thin grey outline so you can easily see which child elements belong to it. It also provides a display of element type, ID, and classes so you can keep track of how to target them with your CSS.

As of WordPress 5.3 you might not need this plugin since the core now ships with a “Group Block” which is similar in purpose, although it has fewer options.

屏幕截图

  • You can nest magic blocks inside each other to build complex layouts.
  • Custom attributes supported

区块

该插件提供了1个区块.

  • Magic Block

评价

2022 年 5 月 11 日
you said, that as we have a group block now, we might don't need to use this plugin. Unfortunately group block stinks, it ads some inner divs which makes it unusable for a lot of stuff, for example grid or flex container. Your plugin is just perfect. It should be THE FIRST Gutenberg block to be released, it's such a timesaver and pleasure to work with. I can pay for this, but please, don't abandon it.
2021 年 10 月 24 日
Wonderful plugin, just hope this project keeps updated! thank you so much!
2021 年 9 月 13 日
White Magic, This should be in the very core of Gutenberg. I used it to implement Keen Slider Because there’s no way to get rid of the additional annoying nested wrappers in default columns or groups blocks.
2021 年 5 月 26 日
This plugin is just perfect for a full control of gutenberg's based layouts. It just fills a very important functionality that gutenberg lacks and it should come built in with WordPress. Great job.
阅读所有10条评价

贡献者及开发者

“Magic Block” 是开源软件。 以下人员对此插件做出了贡献。

贡献者

「Magic Block」插件已被翻译至 2 种本地化语言。 感谢所有译者为本插件所做的贡献。

将“Magic Block”翻译成您的语言。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志