Skip to main content
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Prior to 3.0 I know you used to be able to specify the number of rows you wanted in the constructor of an HTMLEditorField, but that is no longer the case. Is there a new method for changing properties of the HTMLEditorField, or perhaps a new field for shorter content in SS3 I haven't discovered yet?
Bump. Anyone got any answer for this?
Anyone got any answer for this in 3.1?
Thanks for the reply - but struggling with this a little.
How would it be applied to this CMS field?
$fields->addFieldToTab('Root.OtherDetails', new HTMLEditorField('ContactBox', 'Contact Box'));
To answer my own question here, in case anyone else was struggling with it:
$myHTMLfield = new HTMLEditorField('FieldName', 'Title for this Field');
$fields->addFieldToTab('Root.Main', $myHTMLfield, '');
$fields->addFieldToTab("Root.Main", HtmlEditorField::create("FieldName", "Field title")->setRows(4));