bigfork/htmleditorsrcset 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

bigfork/htmleditorsrcset

最新稳定版本:4.0.0

Composer 安装命令:

composer require bigfork/htmleditorsrcset

包简介

Simple srcset integration with SilverStripe’s HTMLEditorField

README 文档

README

Simple srcset integration with SilverStripe’s HTMLEditorField.

What it does

Adds a srcset attribute for the provided pixel densities to every image inserted through TinyMCE. Resulting in an image tag like:

<img width="100" height="50" src="assets/530dffc7f9/image__ResizedImageWzE5OCwxMzJd.jpg"
    srcset="assets/530dffc7f9/image__ResizedImageWzE5OCwxMzJd.jpg 1x, assets/530dffc7f9/image__ResizedImageWzM5NiwyNjRd.jpg 2x"
/>

What it doesn’t do

This module doesn’t add a sizes attribute, nor does it specify widths in srcset - only pixel densities.

Specifying your own pixel densities

The module will add sources for 1x and 2x pixel densities by default. You can set your own pixel densities by setting the following in your config.yml:

Bigfork\HTMLEditorSrcset\ImageShortcodeHandler:
  pixel_densities: [1, 2, 3]

统计信息

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

GitHub 信息

  • Stars: 10
  • Watchers: 4
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2016-04-13