承接 kinglozzer/htmleditorstylinghook 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kinglozzer/htmleditorstylinghook

最新稳定版本:2.0.0

Composer 安装命令:

composer require kinglozzer/htmleditorstylinghook

包简介

Allows adding CSS classes to HTMLEditorFields for styling hooks

README 文档

README

#HtmlEditorStylingHook#

A module to allow easy adding of CSS classes to SilverStripe's HtmlEditorField instances.

###Simple example###

HomePage.php

<?php

use SilverStripe\Forms\FieldList;

class HomePage extends Page
{
    public function getCMSFields() {
        $this->beforeUpdateCMSFields(function (FieldList $fields) {
            if ($content = $fields->dataFieldByName('Content')) {
                $content->setAttribute('data-mce-body-class', 'HomePage');
            }
        });

        return parent::getCMSFields();
    }
}

editor.css

.HomePage {
  background: #000;
  color: #fff;
}

Currently only set up for use in the CMS. To use with a different HtmlEditorConfig instance, simply copy the approach in _config.php

统计信息

  • 总下载量: 4.76k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 2
  • 开发语言: JavaScript

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2014-04-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固