is there a way to add a custom class to a specific tag with the TextEditorField - EasyAdmin : https://symfony.com/bundles/EasyAdminBundle/current/fields/TextEditorField.html
This field is using trix editor : https://trix-editor.org
I'd like to do something like this :
public function configureFields(string $pageName): iterable {
return [
TextEditorField::new('description', 'Description')->setNumOfRows(30)->setTrixEditorConfig([
'blockAttributes' => [
'default' => ['tagName' => 'p'],
'heading1' => ['tagName' => 'h2', 'class' => 'myClass'],
]
])
];
}
Actually, I want to add the class 'myClass' to all the h2 tags.