abhaynikam / react-trix-rte

React wrapper for Trix rich text editor created by Basecamp
https://abhaynikam.github.io/react-trix-rte
MIT License
71 stars 10 forks source link

Example code not working #58

Open tilvan opened 2 years ago

tilvan commented 2 years ago

Hi! I'm trying to add an editor component to my app. But it's not working.

https://codesandbox.io/s/react-trix-rte-example-sd416v

tilvan commented 2 years ago

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>