wegmeister/hyphenator 问题修复 & 功能扩展

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

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

wegmeister/hyphenator

Composer 安装命令:

composer require wegmeister/hyphenator

包简介

Neos-Plugion of the Word-Hyphenation for PHP based on the TeX-Hyphenation algorithm.

README 文档

README

Neos-Plugion of the Word-Hyphenation for PHP based on the TeX-Hyphenation algorithm.

Installation

To install the package simply run

composer require wegmeister/hyphenator

Usage

Add the hyphenator to the elements you want hyphenation on:

Usage via fusion:

prototype(Vendor.Package:Element) {
	# Add the hyphenator to a specific property only:
	property = ${q(node).property('property')}
	property.@process.hyphenate = Wegmeister.Hyphenator:Hyphenate {
		# Set locale to the locale you want to use, defaults to the current locale
		locale = 'de_DE'

		# Set forceConversion to "true" if you also want to hyphenate the text in the backend.
		forceConversion = true
	}

	# Instead of applying the hyphenator to all properties, you can hyphenate the complete element.
	# This will not hyphenate html tags:
	@process.hyphenateWholeElement = Wegmeister.Hyphenator:Hyphenate
}

Usage via fluid:

{namespace hyphenator=Wegmeister\Hyphenator\ViewHelpers}

<!--
Parameters are optional:
- locale: Custom locale to use for hyphenation (default: locale of current language)
- force:  Force hyphenation in backend, too.
-->

<hyphenator:format.hyphenate locale="de_DE" force="{true}">
	Text and <span>HTML</span> to hyphenate.
</hyphenator:format.hyphenate>

OR

{text -> hyphenator:format.hyphenate(locale: 'de_DE', force: true)}

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 4
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2016-02-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固