Typo3 visual editor

From dirnbauer/webconsulting-skills · View interactive version

Typo3 visual editor is an AI agent skill from the GitHub repository dirnbauer/webconsulting-skills. Installs, configures, removes, and migrates TYPO3 sitepackages for FriendsOfTYPO3 Visual Editor, including inline editing, f:render.text, f:render.contentArea, f:mark.contentArea, record transformation, PAGEVIEW content areas, colPos migration, and template readiness. Use when the user mentions Visu

How to use this skill

Skill file

TYPO3 Visual Editor

Source: https://github.com/dirnbauer/webconsulting-skills

Use this skill to make a TYPO3 project ready for friendsoftypo3/visual-editor, especially when upgrading Fluid templates so editors can edit fields and content areas in context.

The critical work is not only installing the extension. The Visual Editor needs frontend output that is traceable back to records, fields, and content areas. Migrate page columns to f:render.contentArea where possible and migrate editable text fields to f:render.text.

What it does

The Visual Editor adds an in-backend frontend editing mode for TYPO3 content. Editors can work close to the rendered page, with inline text editing, drag-and-drop repositioning, adding/removing content elements, real-time preview behavior, workspace support, optional autosaving, container support, and Context Panel integration.

For custom sitepackages, the extension depends on Fluid hooks:

When to use

Use this skill when the user asks for:

Version strategy

Prefer TYPO3 v14.2+ and Core ViewHelpers:

<f:render.contentArea contentArea="{content.main}" />
<h1>{record -> f:render.text(field: 'header')}</h1>

Use f:mark.contentArea only when the project cannot use the v14.2+ content-area pipeline yet, for example TYPO3 v13 compatibility or legacy content rendering with VHS/Flux/container loops.

Always verify the package constraints before changing composer.json; current upstream (1.7.1) requires PHP 8.2+ and supports TYPO3 13.4.22+ or 14.3+ (typo3/cms-core ^13.4.22 || ^14.3.0; only early 1.0.x releases supported 14.2).

How to install

Composer installation:

ddev composer require friendsoftypo3/visual-editor
ddev typo3 cache:flush

Without DDEV:

composer require friendsoftypo3/visual-editor
vendor/bin/typo3 cache:flush

Non-Composer installation:

  1. Install the extension through the TYPO3 Extension Manager.
  2. Activate visual_editor.
  3. Flush TYPO3 caches.
  4. Run database updates if the Install Tool requests them.

Optional helpers:

How to configure

  1. Confirm backend users can access the Visual Editor module and page tree.
  2. Make frontend rendering use templates that expose editable records and fields.
  3. Add record-transformation where templates currently receive raw arrays but need Record objects.
  4. Render page columns through f:render.contentArea on TYPO3 v14.2+.
  5. Wrap unavoidable legacy column renderers with f:mark.contentArea.
  6. Ensure rich-text styles used by CKEditor are also available in frontend CSS, because Visual Editor uses the rendered frontend context.
  7. Test in the backend Visual Editor module with a real editor user, not only an admin account.

Record transformation

If a content element template has raw {data} but no {record} object, add the data processor before using f:render.text:

lib.contentElement.dataProcessing.1768551979 = record-transformation

Then render TCA-backed text fields from the Record object:

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

Use the database/TCA field name in field, not an Extbase property alias.

Template migration workflow

1. Inventory editable fields

Search Fluid templates for direct field output and manual text formatting:

rg -n "\{(record|data)\.[a-zA-Z0-9_]+\}|format\.html|format\.nl2br" Resources/Private

For each TCA-backed input, textarea, or richtext field shown in frontend output, prefer f:render.text.

Before:

<h1>{record.header}</h1>
<f:format.html>{record.bodytext}</f:format.html>
<f:format.nl2br>{record.teaser}</f:format.nl2br>

After:

<h1>{record -> f:render.text(field: 'header')}</h1>
<div class="prose">{record -> f:render.text(field: 'bodytext')}</div>
<p>{record -> f:render.text(field: 'teaser')}</p>

For conditional rendering, render once into a variable so the condition and output use the same processed value:

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

2. Migrate content areas

Find legacy content rendering:

rg -n "lib\.dynamicContent|f:cObject|v:content\.render|flux:content\.render|children_" Resources/Private Configuration

On TYPO3 v14.2+, replace dynamic colPos rendering with f:render.contentArea.

Before:

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

After:

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

The replacement is not a mechanical 3 to main conversion. {content.main} exists when the page uses PAGEVIEW, the page-content data processor, and a backend layout column whose identifier is main. Map every old colPos to the matching backend layout identifier:

| Legacy value | Backend layout contract | Fluid output |

|--------------|-------------------------|--------------|

| colPos = 0 | identifier main | {content.main} |

| colPos = 1 | identifier sidebar | {content.sidebar} |

| colPos = 3 | identifier main, stage, or project-specific name | {content.<identifier>} |

Set up PAGEVIEW and page-content processing when missing:

page = PAGE
page {
  10 = PAGEVIEW
  10 {
    paths.10 = EXT:my_sitepackage/Resources/Private/Templates/
    dataProcessing.10 = page-content
  }
}

Keep backend layout identifiers stable because they become the template contract.

3. Use fallback wrappers for legacy rendering

If the project cannot use f:render.contentArea, preserve the existing renderer and wrap it:

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

For EXT:container child columns:

<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>

For EXT:vhs:

<f:mark.contentArea colPos="0">
    <v:content.render column="0"/>
</f:mark.contentArea>

For EXT:flux:

<f:mark.contentArea colPos="{data.uid}00">
    <flux:content.render area="column0"/>
</f:mark.contentArea>

Treat f:mark.contentArea as a compatibility step. Plan to remove it when the project moves fully to TYPO3 v14.2+ Core content areas.

Backend fields

For every field that is editable in the backend and rendered in the frontend:

Content Blocks templates follow the same rule once a Record object is available. If the frontend template only exposes {data}, either add record transformation or keep direct rendering for values that are not supported by f:render.text.

Problems to check

Inline text is not editable:

Content area is not highlighted or drag-and-drop does not work:

Rich text looks different while editing:

Multi-domain editing fails:

Workspace behavior differs:

Do

Don't

How to remove

Composer removal:

ddev composer remove friendsoftypo3/visual-editor
ddev typo3 cache:flush

Without DDEV:

composer remove friendsoftypo3/visual-editor
vendor/bin/typo3 cache:flush

Non-Composer removal:

  1. Disable and uninstall visual_editor in the Extension Manager.
  2. Flush caches.
  3. Remove Visual Editor-specific configuration.
  4. Remove f:mark.contentArea wrappers if the ViewHelper came from the extension and the project no longer has it installed.

On TYPO3 v14.2+, keep f:render.contentArea and f:render.text unless there is a project reason to revert them. They are Core ViewHelpers and remain valid without the extension.

FAQ

Is installing the extension enough?

Only for themes/templates that already expose editable fields and content areas in the expected way. Custom sitepackages usually need Fluid template updates.

What replaces `lib.dynamicContent`?

On TYPO3 v14.2+, use f:render.contentArea with a ContentArea object from the page-content processor:

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

The old colPos number maps through the backend layout column identifier, not through the Fluid ViewHelper itself.

What if the project still supports TYPO3 v13?

Use f:mark.contentArea around the existing renderer for content areas and use the Visual Editor-provided compatibility where available. Keep a migration note to replace those wrappers with f:render.contentArea after moving to TYPO3 v14.2+.

Should all `{record.field}` output become `f:render.text`?

No. Convert TCA-backed text fields that editors should edit inline. Keep images, links, dates, relations, booleans, computed values, and custom view models on appropriate rendering paths.

Can I use `f:render.text` with Extbase models?

Yes, if the model maps to TCA-backed fields and includes the needed record type information. The field argument still uses the database/TCA field name.

Why does `optional: true` matter?

Shared partials may render several content types. If a field is missing for one record type, optional: true lets the partial continue instead of throwing a missing-field exception.

Does Visual Editor replace backend forms?

No. It improves contextual editing, but complex fields, media replacement, permissions, validation, localization, workspaces, and advanced forms still rely on TYPO3 backend behavior and the Context Panel.

Validation checklist

Sources

Source: https://github.com/dirnbauer/webconsulting-skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.