#Richeditor v4, set default height

9 messages · Page 1 of 1 (latest)

grizzled reef
#

Hi
I am wondering if there is a good way to set the defualt height (rows) of a richeditor in v4?
I tried doing RichEditor::make('description') ->json() ->extraAttributes(['style' => 'min-height: 18em;']) which works, but only the first line is clickable/focusable - so its a bit confusing for the user.

hushed zephyrBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

grizzled reef
#

Perhaps a bit difficult to see from the video, but only the first line is clickable

tame gale
#

Use the ->toolbarButtons() and ->maxHeight() or customize the editor content area directly via CSS targeting, not the outer wrapper. Unfortunately, Filament v4 does not expose a built-in rows or height option on the RichEditor, so we need to extend it a bit.

#

RichEditor::make('description') ->json() ->extraAttributes(['class' => 'custom-rich-editor'])

#

.custom-rich-editor .ProseMirror { min-height: 18em; }

grizzled reef
tame gale
#

yes

hushed zephyrBOT