sebkln/ckeditor-wordbreak
Composer 安装命令:
composer require sebkln/ckeditor-wordbreak
包简介
CKEditor 5: wordbreak Plugin - Adds the <wbr> HTML element to CKEditor 5 in TYPO3. If set in a long word, the browser may break a line (without adding a hyphen character). Useful e.g. for long URLs and file paths.
README 文档
README
CKEditor 5: wordbreak Plugin (TYPO3 Extension)
Compatibility
TYPO3 12.4.0 - 14.3.99
What does this extension do?
- This extension provides general support for the
<wbr>HTML element in CKEditor 5 and TYPO3 - Editors can insert the element by pressing a button at the current cursor position
- All
<wbr>elements are highlighted in the editor (similar to the softhyphen)
<wbr>: The Line Break Opportunity element
- Allows a line break without adding a hyphen to the wrapped string
- Useful e.g. for long URLs or file paths, displayed on mobile websites or inside narrow parent elements
Line breaks are only applied by browsers if the word is too long for the surrounding element or viewport.
Further information: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr
Screenshots
CKEditor in TYPO3 backend: Highlighted line breaks in editor UI
The <wbr> elements are highlighted with an arrow on a colored background
(similar to the soft-hyphen in TYPO3's editor).
CKEditor in TYPO3 backend: HTML source view
In the source editing mode, <wbr> elements are visible in the HTML.
Frontend view (small viewport): Applied line breaks
In the frontend, the browser adds line breaks to the text where <wbr> elements are set
(but only where necessary).
Installation
composer req sebkln/ckeditor-wordbreak
The extension needs to be installed as any other extension of TYPO3 CMS.
Perform the following steps:
- Load and install the extension
- If necessary, include the static template "CKEditor plugin: wordbreak" into your TypoScript template,
or load the hidden Site Set
sebkln/ckeditor-wordbreakas a dependency (see note below aboutlib.parseFuncin TYPO3 v13+) - Extend your CKEditor configuration (see below)
CKEditor configuration
editor:
config:
# 1. Import the plugin:
importModules:
- '@sebkln/ckeditor-wordbreak'
toolbar:
items:
# 2. Add the button to your existing list of toolbar items:
- WordBreak
# 3. Add <wbr> tag to list of tags that are allowed in the content:
processing:
allowTags:
- wbr
Using lib.parseFunc in TYPO3 v13+
Beginning with TYPO3 v13, the properties allowTags and denyTags are now
optional.
This means you must only add this extension's TypoScript if you use a custom version of lib.parseFunc_RTE
that already uses allowTags to restrict the HTML tags.
Otherwise, all tags except <wbr> would be encoded in the frontend.
Please note that this change only applies to TypoScript.
allowTags is still needed in the CKEditor's YAML configuration for processing.
sebkln/ckeditor-wordbreak 适用场景与选型建议
sebkln/ckeditor-wordbreak 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 42.29k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2023 年 09 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「plugin」 「editor」 「CKEditor」 「typo3」 「linebreak」 「wordbreak」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 sebkln/ckeditor-wordbreak 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 sebkln/ckeditor-wordbreak 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 sebkln/ckeditor-wordbreak 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
CakePHP 4.x AdminLTE Theme.
The file manager intended for using Laravel with CKEditor / TinyMCE / Colorbox
Adds more BBCode
This nova package allows you to use CKEditor 4 for text areas.
UEditor 是一套开源的在线HTML编辑器,主要用于让用户在网站上获得所见即所得编辑效果,开发人员可以用 UEditor 把传统的多行文本输入框(textarea)替换为可视化的富文本输入框。
Edit rich text content in Craft CMS using CKEditor.
统计信息
- 总下载量: 42.29k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 35
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2023-09-12


