lochmueller / autoloader

⚙️ Best TYPO3 Swiss Army knife ever ⚙️
http://typo3.org/extensions/repository/view/autoloader
20 stars 30 forks source link

@enableRichText doesn't work with TYPO3 dev-master/7LTS #31

Closed josefglatz closed 8 years ago

josefglatz commented 8 years ago

Actually ;;;richtext:rte_transform[flag=rte_enabled|mode=ts_css] isn't added to TCA for fields where I annotate it through PHPDoc Block

<?php

namespace Foo\Ccontent\Domain\Model\Content;

use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;

/**
 * Class TextTeaser
 * @package Foo\Ccontent\Domain\Model\Content
 * @db tt_content
 * @wizardTab common
 */
class TextTeaser extends AbstractEntity
{
    /**
     * @var string
     * @enableRichText
     */
    protected $bodytext;

    /**
     * @return string
     */
    public function getBodytext()
    {
        return $this->bodytext;
    }

    /**
     * @param string $bodytext
     */
    public function setBodytext($bodytext)
    {
        $this->bodytext = $bodytext;
    }
}
josefglatz commented 8 years ago

I found the problem.

The enableRichText has to be implemented otherwise with TYPO3 7.6.

Instead of ;;;richtext:rte_transform[flag=rte_enabled|mode=ts_css] just adding the label is needed ;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:bodytext_formlabel within the TCA configuration.

Additionally to this the autoloader must generate something like https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/fluid_styled_content/Configuration/TCA/Overrides/tt_content.php#L55 to activate RTE