Example code not working
tilvan opened this issue · 1 comments
tilvan commented
Hi! I'm trying to add an editor component to my app.
But it's not working.
tilvan commented
Also I'm trying to use isRailsDirectUpload with railsDirectUploadUrl or/and railsBlobUrl or without them.
Result is one - it's not working. File doesn't sent to backend.
import 'trix/dist/trix';
import { ReactTrixRTEInput } from 'react-trix-rte';
<Fragment>
<ReactTrixRTEInput
name={name}
defaultValue={value}
className={styles.editor}
isRailsDirectUpload={true}
railsDirectUploadUrl={`${HOST}/rails/active_storage/direct_uploads'`}
railsBlobUrl={`${HOST}/rails/active_storage/blobs/:signed_id/:filename`}
/>
</Fragment>