How to adjust customize image in rich text editor.

hello everyone. i am currently working with the rich text editor. i'm trying to adjust the image in the center of the text editor. But it's not working. is there way to do it or some free plugin which can help in image customization.
4 Replies
LeandroFerreira
LeandroFerreira22h ago
what code did you try?
Ali Hassan
Ali HassanOP22h ago
@Leandro Ferreira try to do this Forms\Components\RichEditor::make('description') ->required() ->columnSpanFull() ->toolbarButtons([ 'bold', 'italic', 'underline', 'strike', 'link', 'heading', 'blockquote', 'bulletList', 'orderedList', 'codeBlock', 'image', ]) ->fileAttachmentsDisk('public')
->fileAttachmentsDirectory('news-events/content') ->extraInputAttributes([ 'style' => ' img { display: block !important; margin-left: auto !important; margin-right: auto !important; } ', ]), but it didn't work out
LeandroFerreira
LeandroFerreira22h ago
create a custom theme then, add to the theme.css
trix-editor img {
margin:auto;
}
trix-editor img {
margin:auto;
}
Ali Hassan
Ali HassanOP22h ago
ok thanks alot for taking your time to answer. i'll try it. let you know if i need any more guidance.

Did you find this page helpful?