friendsoftypo3/visual-editor 问题修复 & 功能扩展

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

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

friendsoftypo3/visual-editor

Composer 安装命令:

composer require friendsoftypo3/visual-editor

包简介

TYPO3 CMS Visual Editor - Brings a modern WYSIWYG editing experience to TYPO3 CMS.

README 文档

README

Next Generation Frontend Editing for TYPO3 CMS.

This extension provides visual editing features for content elements in TYPO3 CMS.

Features

  • ✍️ Inline editing it looks perfectly like the frontend output (WYSIWYG)
  • 🧲 Drag-and-drop repositioning of content elements (➕ adding and 🗑️ deleting elements)
  • ⚡ Real-time preview of changes without page reloads
  • 😊 User-friendly interface for non-technical editors
  • ♿ Accessibility-aware editing controls for TYPO3 editors
Editing.Made.Visual.mp4

Compatibility

Visual Editor TYPO3 PHP Support / Development
1.x 13 - 14 8.2 - 8.5 features, bugfixes, security updates

Installation

  1. 📦 composer require friendsoftypo3/visual-editor (or install via 🧩 Extension Manager)
  2. 🧱 Add f:render.text, f:mark.contentArea to your templates (see below)
  3. 🧹 Clear caches
  4. 🚀 Start editing!

Useful links:

For editors

  • 🔗 Opening editable links: when editable text is inside a link, left click starts editing the text. To open the link instead, use the middle mouse button or Ctrl/Cmd + click.
  • 💾 Saving changes: use the save button. Autosave is available only when enabled, and the UI says to switch to a workspace if autosave is disabled.
  • 🔦 Finding editable areas: use Spotlight to highlight editable text, rich text, images, and content elements.
  • 👻 Showing empty fields: use "show empty" when editable but currently empty fields are hard to see.
  • 🌐 Multi language edits: available with TYPO3 v14. Use the "Multi language" view to compare translations side by side, edit visible fields in each preview, and save pending changes together.
  • ↔️ Moving content: drag content elements by their handle. Hold Ctrl while dropping to copy instead of moving.
  • ✍️ Editing special text characters: type ­ for a soft hyphen and   for a non-breaking space. Entity-like text that starts with &, such as  , is shown with & while editing so it stays literal text.

Template Integration

visual_editor uses ViewHelpers in Fluid templates to mark the areas that should be editable. In TYPO3 v14, the extension uses existing ViewHelpers in TYPO3 Core to hook into the rendering. This means that the extension works out-of-the-box for the new theme "Camino" and also for the default fluid_styled_content templates.

If you want to add visual editing to your own templates, you need to add some ViewHelpers to all locations that should be editable:

Text/RichText Fields

Replace the output of your texts with the f:render.text ViewHelper.

  • record is already a Record object:
before:
<f:if condition="{record.header}">
  <h1>{record.header}</h1>
</f:if>

after:
<f:variable name="header" value="{record -> f:render.text(field: 'header')}" />
<f:if condition="{header}">
  <h1>{header}</h1>
</f:if>
before:
<h1>{record.header}</h1>

after:
<h1>{record -> f:render.text(field: 'header')}</h1>

If you do not have a Record object yet, you can create one with the record-transformation DataProcessors:

// add record dataProcessor for all content elements
lib.contentElement.dataProcessing.1768551979 = record-transformation

Editable text entities

For plain editable text fields, Visual Editor makes some otherwise hard-to-see characters explicit while the field is focused. Soft hyphens are shown as &shy;, and non-breaking spaces are shown as &nbsp;. Plain ampersands stay visible as &, but ampersands that start an entity-like sequence, such as &nbsp;, &#160;, or &#xA0;, are shown as &amp; while editing so the sequence stays literal text. When the editor changes or leaves the field, these values are converted back before validation and storage.

<h1>{record -> f:render.text(field: 'header')}</h1>

Fluid components

When you use Fluid components, render the editable text outside the component and pass the rendered value into the component. This keeps the component decoupled from records and TCA fields, and lets callers pass either a plain string or the result of f:render.text.

<my:component.card header="{record -> f:render.text(field: 'header')}" />

Inside the component, accept the argument as a string or stringable value:

<f:argument name="header" type="string|Stringable" />

ContentArea

ViewHelper f:render.contentArea (v14)

This newly introduced ViewHelper (v14) is the recommended way to render content areas in the TYPO3 in general.

Short description what you need to change in your templates:

before:
<f:cObject typoscriptObjectPath="lib.dynamicContent" data="{colPos: '3'}"/>

after:
<f:render.contentArea contentArea="{content.main}" />

content.main here is automatically filled if you use PAGEVIEW and a BackendLayout with a column with an Identifier named main.

More information in the Official Documentation.

If you can not use the f:render.contentArea ViewHelper, you can also use the f:mark.contentArea ViewHelper.

ViewHelper f:mark.contentArea (v13)

Use f:render.contentArea if possible!

Add the f:mark.contentArea ViewHelper to the Fluid template that renders your content elements.

search for:

  • f:cObject (typoscript rendering):
    before:
    <f:cObject typoscriptObjectPath="lib.dynamicContent" data="{colPos: '3'}"/>
    
    after:
    <f:mark.contentArea colPos="3">
      <f:cObject typoscriptObjectPath="lib.dynamicContent" data="{colPos: '3'}"/>
    </f:mark.contentArea>
  • each="{children_ (EXT:container):
    before:
    <f:for each="{children_201}" as="element">
      {element.renderedContent -> f:format.raw()}
    </f:for>
    
    after:
    <f:mark.contentArea colPos="201" txContainerParent="{record.uid}">
      <f:for each="{children_201}" as="element">
        {element.renderedContent -> f:format.raw()}
      </f:for>
    </f:mark.contentArea>
  • v:content.render (EXT:vhs):
    before:
    <v:content.render column="0"/>
    
    after:
    <f:mark.contentArea colPos="0">
      <v:content.render column="0"/>
    </f:mark.contentArea>
  • flux:content.render (EXT:flux):
    before:
    <flux:content.render area="column0"/>
    
    after:
    <f:mark.contentArea colPos="{data.uid}00">
      <flux:content.render area="column0"/>
    </f:mark.contentArea>

Known limitations

  • Wrapped content elements rendered with f:render.contentArea and recordAs are not currently supported for drag-and-drop. In this setup, drag handles may disappear. Move the wrapping markup into the content element rendering instead of wrapping elements at the contentArea level.
  • Headless and non-Fluid setups are not first-class integration targets. Visual Editor relies heavily on Fluid ViewHelpers that wrap output in web components and load the required JavaScript, so robust headless integration would need a public API.
  • Cross-domain headless setups are further limited because backend-module frame messaging does not work reliably across domains due to TYPO3 core limitations. General multi-domain setups are effectively excluded for this approach.

Multi Site/Domain Setup

You need to be Logged in to every Domain separately to use the Visual Editor.

OR you can use EXT:multisite_belogin it automatically logs you in to all sites/domains.

Rich Text Styling

Visual Editor uses your regular frontend CSS for the editing view. CSS that is configured only in the TYPO3 RTE configuration (contentsCss) is not applied there.

If your project defines custom rich-text styles, add the relevant rules to your frontend CSS so the page output and the editor share the same styling. Projects with custom lib.parseFunc_RTE setups may also need matching frontend rules.

Accessibility

Visual Editor is designed with WCAG 2.2 AA as a goal, but this is not a full compliance claim for every TYPO3 project.

The editor interface includes accessible labels, keyboard-focusable controls, validation announcements, and semantic roles. It has been tested with axe DevTools and NVDA.

Final accessibility depends on the project templates, CSS, semantic HTML, and editor-authored content. Drag-and-drop workflows are pointer-oriented, so projects should verify alternative workflows for their editor needs. Project-level accessibility should be checked in the integrated TYPO3 site.

License and Authors: License type, contributors, contact information

This extension is licensed under the GPL-2.0-or-later license.

with ♥️ from anders und sehr logo

If something did not work 😮
or you appreciate this Extension 🥰 let us know.

We are always looking for great people to join our team!
https://www.andersundsehr.com/karriere/

friendsoftypo3/visual-editor 适用场景与选型建议

friendsoftypo3/visual-editor 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5.71k 次下载、GitHub Stars 达 57, 最近一次更新时间为 2026 年 03 月 14 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「cms」 「wysiwyg」 「editor」 「extension」 「visual」 「core」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 friendsoftypo3/visual-editor 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 friendsoftypo3/visual-editor 我们能提供哪些服务?
定制开发 / 二次开发

基于 friendsoftypo3/visual-editor 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 5.71k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 57
  • 点击次数: 16
  • 依赖项目数: 4
  • 推荐数: 5

GitHub 信息

  • Stars: 57
  • Watchers: 6
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2026-03-14