EasyAdminBundle
EasyAdminBundle copied to clipboard
Unable to use custom block types in TextEditorField
Given the following field:
yield TextEditorField::new('content')
->setTrixEditorConfig([
'blockAttributes' => [
'default' => ['tagName' => 'p'],
'heading1' => ['tagName' => 'h2'],
],
]);
When editing an existing entity the configured block attributes aren't respected - all <p>
and <h2>
tags in the editor are converted to <div>
.
This happens with EasyAdmin v4.3.4. Looks like the cause is the Trix editor itself (see here) - and from what I'm seeing I'd suggest the best possible fix for this issue would be to abandon Trix in favour of something sane and mature.