To achieve the same functionality as the <CFormInput> component with the placeholder, value, and onChange attributes in the <FroalaEditorComponent>, you can do the following:

import FroalaEditorComponent from 'react-froala-wysiwyg';

<FroalaEditorComponent
  tag='textarea'
  placeholder='Enter Question here...'
  model={enteredQuestion}
  onModelChange={addQuestion}
/>

In this example, we use the tag prop to specify that we want to render the <FroalaEditorComponent> as a <textarea>. The placeholder prop is used to set the placeholder text, and the model prop is used to set the initial value of the editor. The onModelChange prop is used to handle the change event and update the enteredQuestion state accordingly

CFormInput label=Question placeholder=Enter Question here value=enteredQuestion onChange=addQuestion how can we write same in froalaedito

原文地址: https://www.cveoy.top/t/topic/hWmM 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录