WordPress 编辑器扩展,用于创建和管理网格。

安装次数: 106

依赖项: 0

建议者: 0

安全性: 0

星标: 3

关注者: 6

分支: 1

开放问题: 0

语言:JavaScript

类型:wordpress-plugin

v3.0.1 2017-01-13 12:11 UTC

This package is auto-updated.

Last update: 2024-09-05 18:49:07 UTC


README

一个轻量级的 WordPress 插件,通过 WordPress 文章编辑器创建和管理网格。

安装

安装方式

composer require dotsunited-wordpress-plugin/editor-grid

注意:此插件不会自动将所需的样式添加到前端页面(仅添加到管理员编辑器),以防止多个插件在网站头部添加多个 CSS 文件(这会破坏页面速度)。

鼓励将 LESS 集成到 Webpack 工作流程中。

您可以在 这里 找到可能的客户端样式的示例脚手架,以及可能的 WordPress-Webpack 设置 这里

该插件生成的 HTML 看起来像这样

<div class="editor-grid editor-grid-shadow editor-grid-background">
    <div class="editor-grid-container">
        <div class="editor-grid-unit editor-grid-unit-6 editor-grid-shadow editor-grid-background-highlight">
            <!-- Content -->
        </div>
        <div class="editor-grid-unit editor-grid-unit-6 editor-grid-background">
            <!-- Content -->
        </div>
    </div>
</div>

为其他编辑器启用

可以通过通过 dotsunited_editor_grid_editor_ids 过滤器注册编辑器 ID 来为其他编辑器启用网格插件。

add_filter('dotsunited_editor_grid_editor_ids', function($editor_ids) {
    // WP Editor Widget plugin
    $editor_ids[] = 'wpeditorwidget';
    return $editor_ids;
});

许可协议

版权所有 (c) 2015-2018 Dots United GmbH。在 MIT 许可证下发布。