定制 f7media/f7hyphenator 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

f7media/f7hyphenator

Composer 安装命令:

composer require f7media/f7hyphenator

包简介

Provides a hyphenator ViewHelper to add ­ to text output

README 文档

README

TYPO3 compatibility

TYPO3 Extension f7hyphenator

The "f7hyphenator" extension provides a ViewHelper to add ­ word breakpoints based on vanderlee/phpSyllable in Fluid.

This helps ensuring that longer words break up more nicely inside their containers when displayed in responsive layout.

Features

  • plain and simple: a Fluid ViewHelper to use wherever you need it
  • Language is automatically set based on current context of rendered FE page
  • Alternatively you could also use the stateless service inside php

Usage

<f7:hyphenator>{record.title}</f7:hyphenator>
<f7:hyphenator minTextLength="8" minWordLength="12">{record.title}</f7:hyphenator>

Alternative inline notation and enchaining

{record.title -> f7:hyphenator()}
{record.title -> f7:hyphenator(minWordLength: 12)}
{record.title -> f7:hyphenator() -> f:format.stripTags()}

If needed, you could also directly call the stateless service directly from PHP:

use F7\F7hyphenator\Service\HyphenationService;

$hyphenatedText = HyphenationService::hyphenateString($text, $minWordLength, $minTextLength);

Settings

Parameter Required Type Default Description
minWordLength no int 0 words shorter than this value won't be processed
minTextLength no int 0 texts shorter than this value won't be processed at all

Known Issues

  • Blacklist is currently hardcoded in HyphenationService
  • Blacklisted words are not recognised in dash-separated words (e.g. blacklisted "TYPO3" in "TYPO3-Website")

Contact

For any inquiries or support requests, please contact F7 Media GmbH: https://www.f7.de

URL
Repository: https://github.com/f7media/f7hyphenator/
TER: https://extensions.typo3.org/extension/f7hyphenator/

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2025-10-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固