-
Notifications
You must be signed in to change notification settings - Fork 3
TextField
Daniel Petutschnigg edited this page Sep 26, 2021
·
3 revisions
The TextField is there to provide your react-components with editable text. It requires you to give it a fieldName and an initValue.
import {fields} from '@snek-at/jaen-pages'
const Component = () => {
return(
<fields.TextField
fieldName="sectiontext"
initValue="<p>Your default text</p>"
rtf={true}
/>
)
}
export default Component
Property | Type | Required | Description |
---|---|---|---|
fieldName | string | yes | The fieldName requires you to give the field an identifier that is unique on that page. It is advisable to use descriptive names for fetching purposes. |
initValue | string | yes | The initValue requires a default value for the TextField. |
rtf | boolean | no | The rtf property allows you to choose between a RichTextField (true and default) or a more simple TextField (false) for headings etc. |